Dark mode and other color enhancements to match
This commit is contained in:
parent
9e7a10bf6e
commit
8b4dfe0c0c
12 changed files with 108 additions and 46 deletions
12
settings.php
Normal file
12
settings.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'darkmode') {
|
||||
$darkmode = $_POST['value'] === 'true' ? 'true' : 'false';
|
||||
$_SESSION['darkmode'] = $darkmode; // Update the session to reflect the new mode
|
||||
|
||||
// Send a JSON response back to JavaScript
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode(['darkmode' => $darkmode]);
|
||||
exit;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue