Theme pairs with dark mode toggle, gear active state, PALETTE_DEFAULT_DARK #128

Merged
fen merged 1 commits from fix-theme-pairs-darkmode into dev 2026-09-10 03:25:36 +00:00
Collaborator

Fixes #127

  • Collapse the 10 theme cards into 5 pairs (light swatches top row, dark bottom row)
  • Dark mode toggle in settings and topbar (sun/moon inline SVG matching the gear style)
  • Selecting a pair applies the variant matching the current dark state; toggling dark mode flips to the other variant of the selected pair
  • Persist pair id in localStorage palette-theme, dark flag in palette-dark; server default via PALETTE_DEFAULT_DARK (unset = dark on; false/0/off = light)
  • Precedence: URL ?theme= (base or variant id) > stored pair+dark > server default
  • Settings gear highlights like selected nav tabs on /settings
  • Server-side ResolvePreset/SetDefaultDark helpers with tests

Rendered verification done: /settings shows 5 cards x 10 swatches (2 rows), toggles flip data-preset and sync aria-pressed, /admin shows the topbar toggle, screenshots of both modes taken.

Fixes #127 - Collapse the 10 theme cards into 5 pairs (light swatches top row, dark bottom row) - Dark mode toggle in settings and topbar (sun/moon inline SVG matching the gear style) - Selecting a pair applies the variant matching the current dark state; toggling dark mode flips to the other variant of the selected pair - Persist pair id in localStorage palette-theme, dark flag in palette-dark; server default via PALETTE_DEFAULT_DARK (unset = dark on; false/0/off = light) - Precedence: URL ?theme= (base or variant id) > stored pair+dark > server default - Settings gear highlights like selected nav tabs on /settings - Server-side ResolvePreset/SetDefaultDark helpers with tests Rendered verification done: /settings shows 5 cards x 10 swatches (2 rows), toggles flip data-preset and sync aria-pressed, /admin shows the topbar toggle, screenshots of both modes taken.
fen added 1 commit 2026-09-10 03:18:13 +00:00
Theme pairs with dark mode toggle, gear active state, PALETTE_DEFAULT_DARK (#127)
CI / docker (pull_request) Skipped
CI / test (pull_request) Successful in 25s
dcf2d66a82
- Collapse the 10 theme cards into 5 pairs: light swatches top row, dark bottom row
- Dark mode toggle in settings and topbar (sun/moon inline SVG)
- Toggling dark mode switches to the other variant of the selected pair
- Persist pair id in localStorage palette-theme, dark flag in palette-dark
- Head script resolves base+dark to variant; URL ?theme= accepts both ids and wins
- Settings gear highlights like nav tabs on /settings
- PALETTE_DEFAULT_DARK env var sets server default dark state (default on)
- Server-side resolution helpers + tests
fen merged commit 19cb8d1d45 into dev 2026-09-10 03:25:36 +00:00
Sign in to join this conversation.