diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2022-07-11 15:01:02 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2022-07-11 15:01:02 +0300 |
commit | c2f382aba86aaebb9806ff1b43c1af69992e9a10 (patch) | |
tree | aee205721fd675926c5e7163eec0dddc448f7813 /engine/Skin.php | |
parent | 24982a48f570b89e537850dda4a4d1ac33ea919f (diff) |
support dark mode for images with alpha channel
Diffstat (limited to 'engine/Skin.php')
-rw-r--r-- | engine/Skin.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/Skin.php b/engine/Skin.php index 917eef7..a8924d4 100644 --- a/engine/Skin.php +++ b/engine/Skin.php @@ -23,8 +23,8 @@ class Skin { else $js = null; - $theme = ($_COOKIE['theme'] ?? 'auto'); - if (!in_array($theme, ['auto', 'dark', 'light'])) + $theme = themes::getUserTheme(); + if ($theme != 'auto' && !themes::themeExists($theme)) $theme = 'auto'; $layout_ctx = new SkinContext('\\skin\\base'); |