garden/layouts/partials/head.html
B.A. Baracus 148d6c9126
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"].
2026-05-26 17:36:46 +02:00

22 lines
856 B
HTML

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
{{- if .IsHome -}}
{{ .Site.Title }}
{{- else -}}
{{ .Title }} · {{ .Site.Title }}
{{- end -}}
</title>
{{- with .Description }}<meta name="description" content="{{ . }}">{{- end }}
{{- if not .Description }}{{- with .Site.Params.description }}<meta name="description" content="{{ . }}">{{- end }}{{- end }}
<!-- ASW framework + garden voice -->
<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 -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{- end }}