diff options
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/partials/header.html')
| -rw-r--r-- | themes/danix-xyz-hacker/layouts/partials/header.html | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/themes/danix-xyz-hacker/layouts/partials/header.html b/themes/danix-xyz-hacker/layouts/partials/header.html index ec12b52..49493c6 100644 --- a/themes/danix-xyz-hacker/layouts/partials/header.html +++ b/themes/danix-xyz-hacker/layouts/partials/header.html @@ -48,20 +48,11 @@ <!-- Theme toggle button --> <button id="theme-toggle" - x-data="{ - theme: document.documentElement.classList.contains('theme-light') ? 'light' : 'dark', - toggle() { - this.theme = this.theme === 'dark' ? 'light' : 'dark'; - document.documentElement.className = 'theme-' + this.theme; - localStorage.setItem('theme', this.theme); - } - }" - @click="toggle()" aria-label="{{ i18n "toggleTheme" }}" class="p-2 rounded hover:bg-surface transition-colors" > - <i x-show="theme === 'dark'" data-feather="sun" class="w-5 h-5" aria-hidden="true"></i> - <i x-show="theme === 'light'" data-feather="moon" class="w-5 h-5" aria-hidden="true"></i> + <i id="theme-icon-sun" data-feather="sun" class="w-5 h-5" aria-hidden="true"></i> + <i id="theme-icon-moon" data-feather="moon" class="w-5 h-5" aria-hidden="true"></i> </button> <!-- Hamburger menu button (mobile only) --> |
