diff options
author | Mario <mario@mariovavti.com> | 2023-11-07 10:09:31 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-11-07 10:09:31 +0000 |
commit | 547e6542ba7d396cc1c349577e2078fda098bee6 (patch) | |
tree | d280a038e9b7a54556f9dacbf7f73138afd10c0f /view/theme/redbasic/php/theme.php | |
parent | f74044f9b0f64ac14d0419edb1c2356e8f526f51 (diff) | |
download | volse-hubzilla-547e6542ba7d396cc1c349577e2078fda098bee6.tar.gz volse-hubzilla-547e6542ba7d396cc1c349577e2078fda098bee6.tar.bz2 volse-hubzilla-547e6542ba7d396cc1c349577e2078fda098bee6.zip |
move color_mode related code to theme_init.php
Diffstat (limited to 'view/theme/redbasic/php/theme.php')
-rw-r--r-- | view/theme/redbasic/php/theme.php | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/view/theme/redbasic/php/theme.php b/view/theme/redbasic/php/theme.php index 82f6c80d3..c33c4f78e 100644 --- a/view/theme/redbasic/php/theme.php +++ b/view/theme/redbasic/php/theme.php @@ -16,24 +16,4 @@ function redbasic_init() { - $mode = ''; - $navbar_mode = ''; - - if (local_channel()) { - $mode = ((get_pconfig(local_channel(), 'redbasic', 'dark_mode')) ? 'dark' : 'light'); - $navbar_mode = ((get_pconfig(local_channel(), 'redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); - } - - if (App::$profile_uid) { - $mode = ((get_pconfig(App::$profile_uid, 'redbasic', 'dark_mode')) ? 'dark' : 'light'); - $navbar_mode = ((get_pconfig(App::$profile_uid, 'redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); - } - - if (!$mode) { - $mode = ((get_config('redbasic', 'dark_mode')) ? 'dark' : 'light'); - $navbar_mode = ((get_config('redbasic', 'navbar_dark_mode')) ? 'dark' : 'light'); - } - - App::$page['color_mode'] = 'data-bs-theme="' . $mode . '"'; - App::$page['navbar_color_mode'] = (($navbar_mode === 'dark') ? 'data-bs-theme="' . $navbar_mode . '"' : ''); } |