Start using new HTML5/CSS code.

This commit is contained in:
Darren 'Tadgy' Austin 2024-08-10 23:06:12 +01:00
commit cb4688d7a6
23 changed files with 650 additions and 616 deletions

20
html/toggletheme.php Normal file
View file

@ -0,0 +1,20 @@
<?php
$cookie_data = array(
"expires" => mktime (23, 59, 59, 12, 31, 2069),
"domain" => ".slackware.uk",
"path" => "/",
"httponly" => true,
"samesite" => "Lax"
);
if ($_COOKIE['theme'] != "light") {
$theme = "light";
} else {
$theme = "dark";
}
setcookie ("theme", $theme, $cookie_data);
if (isset ($_SERVER['HTTP_REFERER'])) {
header ("Location: " . $_SERVER['HTTP_REFERER'], true, 302);
} else {
header ("Location: /", true, 302);
}
?>