From 9dc949b62c6b5e3c8872211f71b11714d9d22b22 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 20 Jan 2023 11:05:15 +0000 Subject: native dark theme initial checkin --- include/nav.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/nav.php') diff --git a/include/nav.php b/include/nav.php index 2cdf7d42b..d4e9b8f92 100644 --- a/include/nav.php +++ b/include/nav.php @@ -201,6 +201,8 @@ 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'); + $x = ['nav' => $nav, 'usermenu' => $userinfo]; call_hooks('nav', $x); @@ -317,6 +319,7 @@ function nav($template = 'default') { App::$page['nav'] .= replace_macros($tpl, [ '$baseurl' => z_root(), + '$theme_switch_icon' => $theme_switch_icon, '$fulldocs' => t('Help'), '$sitelocation' => $sitelocation, '$nav' => $x['nav'], -- cgit v1.2.3