diff --git a/config/global.ini b/config/global.ini index 5fa85c8f..14b37393 100644 --- a/config/global.ini +++ b/config/global.ini @@ -27,6 +27,4 @@ A propos = "about.php" 3 = "Directeur" [themes] -0 = '--hue: 0; --saturation: 0%' -1 = '--hue: 204; --saturation: 80%' -2 = '--hue: 197; --saturation: 80%' \ No newline at end of file +0 = '--text: hsl(208, 100%, 96%); --background: hsl(215, 21%, 11%); --banner-background: hsl(216, 28%, 7%); --buttons: hsl(216, 28%, 7%)' \ No newline at end of file diff --git a/html/src/css/style.css b/html/src/css/style.css index 74644ba2..a9da6ad7 100644 --- a/html/src/css/style.css +++ b/html/src/css/style.css @@ -1,23 +1,18 @@ -:root { - --saturation: 0%; - --hue: 0; -} - @media (prefers-color-scheme: dark) { .body { - --text: hsl(var(--hue), var(--saturation), 80%); - --background: hsl(var(--hue), var(--saturation), 15%); - --banner-background: hsl(var(--hue), var(--saturation), 10%); - --buttons: hsl(var(--hue), var(--saturation), 5%); + --text: hsl(0, 0%, 80%); + --background: hsl(0, 0%, 15%); + --banner-background: hsl(0, 0%, 10%); + --buttons: hsl(0, 0%, 5%); } } @media (prefers-color-scheme: light) { .body { - --text: hsl(var(--hue), var(--saturation), 20%); - --background: hsl(var(--hue), var(--saturation), 100%); - --banner-background: hsl(var(--hue), var(--saturation), 100%); - --buttons: hsl(var(--hue), var(--saturation), 100%); + --text: hsl(0, 0%, 20%); + --background: hsl(0, 0%, 100%); + --banner-background: hsl(0, 0%, 100%); + --buttons: hsl(0, 0%, 100%); } } diff --git a/include/functions.php b/include/functions.php index b1af8669..fd804a1b 100644 --- a/include/functions.php +++ b/include/functions.php @@ -10,10 +10,10 @@ if(!isset($_SESSION['role'])) { } if(isset($_GET['theme'])) { - $_SESSION['theme'] = (int)$_GET['theme'] % 2; + $_SESSION['theme'] = (int)$_GET['theme'] % 3; } -$theme = $themes[$_SESSION['theme']]; +$theme = isset($_SESSION['theme']) ? $themes[$_SESSION['theme']] : ""; function nav($nav) {