fix dark/light theme toggle — was a dead button with no JS handler
Root cause: the [data-theme-toggle] button existed in ASW's baseof.html but had no JavaScript attached to it — clicking it did nothing. Fix: - static/js/theme-toggle.js — click handler, localStorage persistence, prefers-color-scheme fallback, dynamic button icon + aria-label - static/css/garden.css — full html[data-theme="light"] variable block (garden + ASW tokens) so light mode actually looks different from dark - layouts/partials/head.html — include theme-toggle.js with defer Light palette: near-white indigo bg (96%), dark indigo text (20%), violet accents. ASW's @media (prefers-color-scheme) doesn't match programmatic data-theme toggle, so garden.css provides duplicating overrides on html[data-theme="light"].
This commit is contained in:
parent
00fa25f436
commit
148d6c9126
121 changed files with 295 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
<link rel="stylesheet" href="{{ "css/asw.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "css/garden.css" | absURL }}">
|
||||
|
||||
<script src="{{ "js/theme-toggle.js" | absURL }}" defer></script>
|
||||
<script src="{{ "js/garden-feed.js" | absURL }}" defer></script>
|
||||
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue