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
|
|
@ -8,6 +8,7 @@
|
|||
<link rel="stylesheet" href="https://garden.trentuna.com/css/asw.css">
|
||||
<link rel="stylesheet" href="https://garden.trentuna.com/css/garden.css">
|
||||
|
||||
<script src="https://garden.trentuna.com/js/theme-toggle.js" defer></script>
|
||||
<script src="https://garden.trentuna.com/js/garden-feed.js" defer></script><link rel="alternate" type="application/rss+xml" href="https://garden.trentuna.com/expressive/index.xml">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue