Dark mode and other color enhancements to match

This commit is contained in:
Cody Cook 2024-05-13 19:38:06 -07:00
commit 8b4dfe0c0c
12 changed files with 108 additions and 46 deletions

12
settings.php Normal file
View 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;
}