Commit new slackware.uk content (with themes).

This commit is contained in:
Darren 'Tadgy' Austin 2022-08-30 02:02:52 +01:00
commit e06c1db9cb
54 changed files with 1457 additions and 2572 deletions

21
html/toggletheme.php Normal file
View file

@ -0,0 +1,21 @@
<?php
require ("includes/vars.php");
$cookie_data = array(
"expires" => "Tue, 31 Dec 2069 23:59:59 GMT",
"domain" => ".slackware.uk",
"path" => "/",
"httponly" => true,
"samesite" => "Lax"
);
if (!$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);
}
?>