Adjust theme switch

This commit is contained in:
kritzl 2025-03-03 22:56:33 +01:00
commit a43ea460c3
Signed by: kritzl
SSH key fingerprint: SHA256:5BmINP9VjZWaUk5Z+2CTut1KFhwLtd0ZynMekKbtViM
8 changed files with 200 additions and 27 deletions

View file

@ -3,21 +3,31 @@ echo \dokuwiki\template\sprintdoc\Template::getInstance()->getNavigation();
?>
<nav class="nav-sitetools">
<div class="nav toggleTheme dark-only" data-theme="light">
<a role="heading" aria-level="2">
<span class="ico">
<i data-icon="light"></i>
</span>
<span class="lbl">Switch to Lightmode</span>
</a>
<div class="nav themeToggle" id="themeToggleLight">
<input
id="themeLight"
type="checkbox"
aria-label="Switch between dark and light mode"
/>
<label for="themeLight">
<span class="ico">
<i data-icon="light"></i>
</span>
<span class="lbl"><?php echo tpl_getLang('custom_modeswitch'); ?></span>
</label>
</div>
<div class="nav toggleTheme light-only" data-theme="dark">
<a role="heading" aria-level="2">
<span class="ico">
<i data-icon="light"></i>
</span>
<span class="lbl">Switch to Darkmode</span>
</a>
<div class="nav themeToggle" id="themeToggleDark">
<input
id="themeDark"
type="checkbox"
aria-label="Switch between dark and light mode"
/>
<label for="themeDark">
<span class="ico">
<i data-icon="light"></i>
</span>
<span class="lbl"><?php echo tpl_getLang('custom_modeswitch'); ?></span>
</label>
</div>
<div class="nav-panel hidden"></div>
<div class="nav"><a href="#sidebar-site-tools" role="heading" aria-level="2">