Compare commits
3 Commits
79b22f1ac1
...
28d3f51317
Author | SHA1 | Date |
---|---|---|
DrMaxNix | 28d3f51317 | |
DrMaxNix | 74ecbd13c4 | |
DrMaxNix | 6af7bfd4c7 |
11
README.md
11
README.md
|
@ -3,6 +3,17 @@ Everything about the German Self-Determination Law in one place
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Easter Egg: Custom Theme Color
|
||||||
|
Have you ever wondered how SBGG.jetzt would look like in another color?
|
||||||
|
Now I have a cool thing for you to try when getting bored of the default theme color!
|
||||||
|
If you manage to set a cookie called `theme` in you browser, with a value of `red`, `orange`, `yellow`, `green`, `cyan`, `blue`, `purple` or `random`, you can change the SBGG.jetzt theme color. Here's an example:
|
||||||
|
```
|
||||||
|
NAME VALUE DOMAIN PATH MAX-AGE
|
||||||
|
theme orange sbgg.jetzt / Fri, 17 Feb 2034 20:49:38 GMT
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Attribution / Credits
|
## Attribution / Credits
|
||||||
- Tabler Icons (MIT): https://github.com/tabler/tabler-icons
|
- Tabler Icons (MIT): https://github.com/tabler/tabler-icons
|
||||||
- Ubuntu font (Ubuntu font licence 1.0): https://design.ubuntu.com/font
|
- Ubuntu font (Ubuntu font licence 1.0): https://design.ubuntu.com/font
|
||||||
|
|
2
meta.php
2
meta.php
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
// VERSION //
|
// VERSION //
|
||||||
static::$version = "1.1.10";
|
static::$version = "1.1.11";
|
||||||
|
|
||||||
|
|
||||||
// DEPENDENCIES //
|
// DEPENDENCIES //
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
|
|
||||||
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
||||||
Page::css("./page/start/style.css");
|
Page::css("./page/start/style.css");
|
||||||
|
Page::css("./page/start/style.css.php", eval: true);
|
||||||
Page::css(__DIR__ . "/style.css");
|
Page::css(__DIR__ . "/style.css");
|
||||||
|
|
||||||
Page::font("ubuntu");
|
Page::font("ubuntu");
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
|
|
||||||
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
||||||
Page::css("./page/start/style.css");
|
Page::css("./page/start/style.css");
|
||||||
|
Page::css("./page/start/style.css.php", eval: true);
|
||||||
Page::js(__DIR__ . "/iframe_magic.js");
|
Page::js(__DIR__ . "/iframe_magic.js");
|
||||||
Page::js(__DIR__ . "/send_one.js");
|
Page::js(__DIR__ . "/send_one.js");
|
||||||
Page::js(__DIR__ . "/send_all.js");
|
Page::js(__DIR__ . "/send_all.js");
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
||||||
Page::css("./page/start/style.css");
|
Page::css("./page/start/style.css");
|
||||||
|
Page::css("./page/start/style.css.php", eval: true);
|
||||||
|
|
||||||
Page::font("ubuntu");
|
Page::font("ubuntu");
|
||||||
Page::font("tabler");
|
Page::font("tabler");
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
||||||
Page::css("./page/start/style.css");
|
Page::css("./page/start/style.css");
|
||||||
|
Page::css("./page/start/style.css.php", eval: true);
|
||||||
|
|
||||||
Page::font("ubuntu");
|
Page::font("ubuntu");
|
||||||
Page::font("tabler");
|
Page::font("tabler");
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
||||||
|
|
||||||
Page::css("./page/start/style.css");
|
Page::css("./page/start/style.css");
|
||||||
|
Page::css("./page/start/style.css.php", eval: true);
|
||||||
Page::js(__DIR__ . "/main.js");
|
Page::js(__DIR__ . "/main.js");
|
||||||
|
|
||||||
Page::font("ubuntu");
|
Page::font("ubuntu");
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
Page::$head["analytics"] = '<script defer data-domain="sbgg.jetzt" src="https://analytics.tjdev.de/js/script.js"></script>';
|
||||||
|
|
||||||
Page::css("./page/start/style.css");
|
Page::css("./page/start/style.css");
|
||||||
|
Page::css("./page/start/style.css.php", eval: true);
|
||||||
Page::js(__DIR__ . "/main.js");
|
Page::js(__DIR__ . "/main.js");
|
||||||
|
|
||||||
Page::font("ubuntu");
|
Page::font("ubuntu");
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
Page::$head["mastodon_verify"] = '<link rel="me" href="https://lsbt.me/@sbggjetzt" />';
|
Page::$head["mastodon_verify"] = '<link rel="me" href="https://lsbt.me/@sbggjetzt" />';
|
||||||
|
|
||||||
Page::css(__DIR__ . "/style.css");
|
Page::css(__DIR__ . "/style.css");
|
||||||
|
Page::css(__DIR__ . "/style.css.php", eval: true);
|
||||||
Page::js(__DIR__ . "/copylink_dict.js.php", eval: true);
|
Page::js(__DIR__ . "/copylink_dict.js.php", eval: true);
|
||||||
Page::js(__DIR__ . "/copylink.js");
|
Page::js(__DIR__ . "/copylink.js");
|
||||||
Page::js(__DIR__ . "/newsletter.js");
|
Page::js(__DIR__ . "/newsletter.js");
|
||||||
|
|
|
@ -36,12 +36,6 @@
|
||||||
--color-purple: #c678dd;
|
--color-purple: #c678dd;
|
||||||
--color-purple-light: #d7a1e8;
|
--color-purple-light: #d7a1e8;
|
||||||
--color-purple-dark: #af5bc8;
|
--color-purple-dark: #af5bc8;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--theme: var(--color-green);
|
|
||||||
--theme-light: var(--color-green-light);
|
|
||||||
--theme-dark: var(--color-green-dark);
|
|
||||||
}
|
}
|
||||||
* {
|
* {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
declare(strict_types = 1);
|
||||||
|
namespace Kimendisch\Sbgg_Jetzt;
|
||||||
|
|
||||||
|
// GET THEME COLOR TO USE //
|
||||||
|
$color_list_lookup = ["red", "orange", "yellow", "green", "cyan", "blue", "purple"];
|
||||||
|
|
||||||
|
// check cookie
|
||||||
|
$theme = $_COOKIE["theme"] ?? "";
|
||||||
|
|
||||||
|
// validate
|
||||||
|
if(!in_array($theme, $color_list_lookup, strict: true) and $theme !== "random"){
|
||||||
|
$theme = "green";
|
||||||
|
}
|
||||||
|
|
||||||
|
// random color
|
||||||
|
if($theme === "random") $theme = array_rand(array_flip($color_list_lookup));
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--theme: var(--color-<?= $theme ?>);
|
||||||
|
--theme-light: var(--color-<?= $theme ?>-light);
|
||||||
|
--theme-dark: var(--color-<?= $theme ?>-dark);
|
||||||
|
}
|
Loading…
Reference in New Issue