Drop turtle, honor ?template= URL param, add warp easter egg

- Removed the cosmos turtle (CSS rules + auto-load probe + JS hook).
  Reduced-motion turtle branch removed too.
- ?template=editorial|swiss|cosmos URL param now wins over the value
  in data/links.json (and the cached localStorage fallback). Wired in
  both the pre-paint boot script and main() so deep links work
  without flashing the wrong template.
- New hidden easter egg: type the letters w-a-r-p anywhere on the
  page (no input focused) and the page reloads on the next template
  in the cycle editorial -> swiss -> cosmos -> editorial. The URL is
  updated with the new ?template= param so the override survives
  refresh and is shareable. A small "↯ <name>" toast pops up after
  the reload via sessionStorage handoff, fades after ~2.5s, respects
  prefers-reduced-motion.
- README documents both the URL param and the warp keyword.
This commit is contained in:
Joel Brock
2026-05-16 09:35:45 -07:00
parent c16ee37096
commit ff0abee349
5 changed files with 102 additions and 63 deletions

View File

@@ -439,6 +439,21 @@ To switch:
Choice is also cached in `localStorage` (`dlstack-template`) so reloads
don't flash the wrong template before JSON parses.
### Overriding the template at view time
Two ways to ride a different template without touching `links.json`:
1. **URL parameter** — `?template=editorial`, `?template=swiss`, or
`?template=cosmos` always wins over the JSON value, so links like
`https://your.site/?template=cosmos` are shareable.
2. **Easter egg** — type `warp` anywhere on the page (no input field
focused). The page reloads on the next template in the cycle and a
small `↯ <name>` toast confirms it. The URL is updated with the new
`?template=` param.
Drop the URL param (or refresh from a clean URL) to return to whatever
`theme.template` says in `data/links.json`.
## Theme (light / dark / auto)
A small pill in the top-right cycles **Auto → Light → Dark → Auto** on