aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-09-21 08:31:53 +0000
committerMario <mario@mariovavti.com>2023-09-21 08:31:53 +0000
commit601ee0b40b4de7a27cb72341c058124d6f19a1f5 (patch)
tree447dc37ca283773624032f35ebb4b40dfc5780fb /include/nav.php
parent9627c3e7c850b3532c3840910c0862f093cd8fb1 (diff)
downloadvolse-hubzilla-601ee0b40b4de7a27cb72341c058124d6f19a1f5.tar.gz
volse-hubzilla-601ee0b40b4de7a27cb72341c058124d6f19a1f5.tar.bz2
volse-hubzilla-601ee0b40b4de7a27cb72341c058124d6f19a1f5.zip
only show theme switch icon if switching is supported by the theme
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/nav.php b/include/nav.php
index 18fa65edc..737beaca2 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -201,7 +201,10 @@ function nav($template = 'default') {
$nav['admin'] = ['admin/', t('Admin'), "", t('Site Setup and Configuration'), 'admin_nav_btn'];
}
- $theme_switch_icon = ((App::$page['color_mode'] === 'dark') ? 'sun' : 'moon');
+ $theme_switch_icon = '';
+ if (isset(App::$page['color_mode'])) {
+ $theme_switch_icon = ((App::$page['color_mode'] === 'dark') ? 'sun' : 'moon');
+ }
$x = ['nav' => $nav, 'usermenu' => $userinfo];