Skip to content

Add dark-mode toggle and site polish - #27

Merged
gronnerup merged 1 commit into
mainfrom
gronnerup/site-polish
Aug 16, 2026
Merged

Add dark-mode toggle and site polish#27
gronnerup merged 1 commit into
mainfrom
gronnerup/site-polish

Conversation

@gronnerup

Copy link
Copy Markdown
Owner

Summary

A small brush-up of the site: a Light / Dark / System theme toggle (remembered per browser), live catalog counts in the hero, a few accessibility touches, and a CI version bump.

Changes

  • Dark-mode toggle (src/components/ThemeToggle.astro): header control cycling System -> Light -> Dark. Preference persists in localStorage and is applied before paint by an inline <head> script (no flash). Defaults to System, so nothing changes for existing visitors.
  • Theming mechanism: Tailwind darkMode switched from media to ['selector', '[data-theme="dark"]']; dark palette/accent tokens moved onto :root[data-theme="dark"] in global.css. color-scheme set per theme.
  • Hero counts (index.astro): live "N tools across M categories" line.
  • A11y: "Skip to content" link + id="main"; the toggle carries an aria-label that reflects the current choice. Hid the Criteria link on very small screens to keep the header tidy.
  • CI: bumped actions/checkout and actions/setup-node to v5 (clears the Node 20 deprecation warnings).

Verification

  • npx astro check -> 0 errors/warnings/hints.
  • npm run build passes; built CSS confirms dark: utilities key on [data-theme=dark] and the theme is set before paint.

@gronnerup
gronnerup merged commit 447de97 into main Aug 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant