default to dark mode, refresh Right now text, CSS barbell gym icons

This commit is contained in:
Martin Dvořák 2026-09-30 21:37:56 +00:00
commit 4a8cac689b
10 changed files with 101 additions and 66 deletions

View file

@ -109,7 +109,8 @@ scripts/
1. `ThemeScript` runs before paint. It reads `localStorage.theme` and sets
`data-theme` (`web` | `skeuo`) on `<html>`, defaulting to `web`; it also reads
`localStorage.scheme` and sets `data-scheme` (`light` | `dark`), defaulting to
`light`. There is no device sniff anymore.
`dark` (only an explicit stored `light` overrides it). There is no device
sniff anymore.
2. `useTheme()` (in `useTheme.ts`) reads `data-theme` via `useSyncExternalStore`
and dispatches a `theme-change` event on toggle. `useColorScheme()` does the
same for `data-scheme` via a `scheme-change` event.
@ -192,6 +193,14 @@ Themes: `web` = default frosted-glass website (sidebar + content, light/dark),
`.web-tile-note` is centered. Every other panel title is centered too:
`.web-section-head` (the eyebrow + `.web-section-title`) and `.web-tile-title`
("Right now" / "Gym PRs"). Desktop keeps the left-aligned headings.
- The gym PR icons (`.gym-icon--squat` / `--bench` / `--deadlift`) are **pure
CSS barbells**, not SVGs: a bar (`::before`) plus plates drawn as layered
`linear-gradient` backgrounds on `::after`, all in `currentColor` so they
adapt to light/dark and the desktop app surface. More plates per side = a
heavier lift (bench 1, squat 2, deadlift 3). Don't swap them back to images.
- `.web-quick` is top-aligned (`align-items: start`) so the shorter "Right now"
tile isn't stretched to the Gym tile's height (it used to leave a big empty
gap under the text).
- Under `max-width: 640px` the year-grid heatmap (`.heatmap-container`) and its
legend/hover row (`.heatmap-status-row`) are `display: none` — the grid is
unreadable at phone widths. The contribution total and the commit history