diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 06:11:00 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2024-01-31 20:45:40 +0300 |
commit | c0dc531ebefd8912819f3b6c8bda1fed3c7e750c (patch) | |
tree | 2c75aa9df182260aef09faf4befd81a4c2b9c5e2 /engine/themes.php | |
parent | 48d688cdf7f9eae1bf11b8a6f0e5b98687c604cb (diff) |
make it simple, but not simpler
Diffstat (limited to 'engine/themes.php')
-rw-r--r-- | engine/themes.php | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/engine/themes.php b/engine/themes.php deleted file mode 100644 index 839377f..0000000 --- a/engine/themes.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -class themes { - - public static array $Themes = [ - 'dark' => [ - 'bg' => 0x222222, - // 'alpha' => 0x303132, - 'alpha' => 0x222222, - ], - 'light' => [ - 'bg' => 0xffffff, - // 'alpha' => 0xf2f2f2, - 'alpha' => 0xffffff, - ] - ]; - - public static function getThemes(): array { - return array_keys(self::$Themes); - } - - public static function themeExists(string $name): bool { - return array_key_exists($name, self::$Themes); - } - - public static function getThemeAlphaColorAsRGB(string $name): array { - $color = self::$Themes[$name]['alpha']; - $r = ($color >> 16) & 0xff; - $g = ($color >> 8) & 0xff; - $b = $color & 0xff; - return [$r, $g, $b]; - } - - public static function getUserTheme(): string { - return ($_COOKIE['theme'] ?? 'auto'); - } - -}
\ No newline at end of file |