Update 3 files

- /include/functions.php
- /html/src/css/style.css
- /config/global.ini
This commit is contained in:
Jan BELLON 2024-03-08 20:46:54 +00:00
parent 02cdb22210
commit 306cb28239
3 changed files with 11 additions and 18 deletions

View File

@ -27,6 +27,4 @@ A propos = "about.php"
3 = "Directeur" 3 = "Directeur"
[themes] [themes]
0 = '--hue: 0; --saturation: 0%' 0 = '--text: hsl(208, 100%, 96%); --background: hsl(215, 21%, 11%); --banner-background: hsl(216, 28%, 7%); --buttons: hsl(216, 28%, 7%)'
1 = '--hue: 204; --saturation: 80%'
2 = '--hue: 197; --saturation: 80%'

View File

@ -1,23 +1,18 @@
:root {
--saturation: 0%;
--hue: 0;
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
.body { .body {
--text: hsl(var(--hue), var(--saturation), 80%); --text: hsl(0, 0%, 80%);
--background: hsl(var(--hue), var(--saturation), 15%); --background: hsl(0, 0%, 15%);
--banner-background: hsl(var(--hue), var(--saturation), 10%); --banner-background: hsl(0, 0%, 10%);
--buttons: hsl(var(--hue), var(--saturation), 5%); --buttons: hsl(0, 0%, 5%);
} }
} }
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
.body { .body {
--text: hsl(var(--hue), var(--saturation), 20%); --text: hsl(0, 0%, 20%);
--background: hsl(var(--hue), var(--saturation), 100%); --background: hsl(0, 0%, 100%);
--banner-background: hsl(var(--hue), var(--saturation), 100%); --banner-background: hsl(0, 0%, 100%);
--buttons: hsl(var(--hue), var(--saturation), 100%); --buttons: hsl(0, 0%, 100%);
} }
} }

View File

@ -10,10 +10,10 @@ if(!isset($_SESSION['role'])) {
} }
if(isset($_GET['theme'])) { 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) { function nav($nav) {