Themes website at themes.bas.es #1

Merged
arne merged 24 commits from feat/website into main 2026-04-27 13:39:40 +02:00
Owner

Summary

A static showcase site for the seven bases themes at themes.bas.es. Each app gets its own page with an HTML mockup whose colors are parsed at build time from the actual theme file in this repo — so the website cannot advertise colors that aren't really in the themes.

  • New Go static-site generator at cmd/site/ with seven self-contained per-app sub-packages (parser + tests + mockup template + render glue).
  • Landing page with hero, palette swatches, and 7-app grid; per-app pages with full-bleed mockup, install snippet, and prev/next nav.
  • Site chrome (CSS, fonts, theme toggle) vendored from the bases design system; site-level dark/light toggle flips chrome and every mockup in lockstep.
  • Golden-file test catches HTML drift; per-app parser tests run against the real theme files and require every required color to be present and look like a color.
  • `Basefile` for deploying via bases at `themes.bas.es`; `Taskfile.yaml` exposes `site:build` / `site:serve` / `site:test` / `site:golden`.
  • Initial committed build at `site/`.

Spec: `docs/superpowers/specs/2026-04-27-themes-website-design.md`
Plan: `docs/superpowers/plans/2026-04-27-themes-website.md`

Known placeholders to update before going live

  • `forgejoURL` const in `cmd/site/main.go` and the `git clone` URL in `Basefile` both point at `https://codeberg.org/arnefismen/themes` — flagged with `TODO(forgejo-url)` comments. Replace with the real `code.bas.es/bases/themes` URL when ready.

Test Plan

  • `go test ./cmd/site/...` — all 8 packages green
  • `go run ./cmd/site -out site/` — produces 1 landing + 7 app pages without error
  • `go run ./cmd/site -serve` — open http://localhost:8080, click each app card, click the theme toggle, confirm chrome and mockups flip together
  • Visual review of each app page — Ghostty, tmux, Helix, Neovim, Fish, Forgejo, Blink — both dark and light variants
  • Edit a theme color (e.g. `ghostty/bases`), re-run build, confirm the mockup updates and the golden test fails with a useful diff (then `task site:golden` to accept)
## Summary A static showcase site for the seven bases themes at `themes.bas.es`. Each app gets its own page with an HTML mockup whose colors are parsed at build time from the actual theme file in this repo — so the website cannot advertise colors that aren't really in the themes. - New Go static-site generator at `cmd/site/` with seven self-contained per-app sub-packages (parser + tests + mockup template + render glue). - Landing page with hero, palette swatches, and 7-app grid; per-app pages with full-bleed mockup, install snippet, and prev/next nav. - Site chrome (CSS, fonts, theme toggle) vendored from the bases design system; site-level dark/light toggle flips chrome and every mockup in lockstep. - Golden-file test catches HTML drift; per-app parser tests run against the real theme files and require every required color to be present and look like a color. - \`Basefile\` for deploying via bases at \`themes.bas.es\`; \`Taskfile.yaml\` exposes \`site:build\` / \`site:serve\` / \`site:test\` / \`site:golden\`. - Initial committed build at \`site/\`. Spec: \`docs/superpowers/specs/2026-04-27-themes-website-design.md\` Plan: \`docs/superpowers/plans/2026-04-27-themes-website.md\` ## Known placeholders to update before going live - \`forgejoURL\` const in \`cmd/site/main.go\` and the \`git clone\` URL in \`Basefile\` both point at \`https://codeberg.org/arnefismen/themes\` — flagged with \`TODO(forgejo-url)\` comments. Replace with the real \`code.bas.es/bases/themes\` URL when ready. ## Test Plan - [ ] \`go test ./cmd/site/...\` — all 8 packages green - [ ] \`go run ./cmd/site -out site/\` — produces 1 landing + 7 app pages without error - [ ] \`go run ./cmd/site -serve\` — open http://localhost:8080, click each app card, click the theme toggle, confirm chrome and mockups flip together - [ ] Visual review of each app page — Ghostty, tmux, Helix, Neovim, Fish, Forgejo, Blink — both dark and light variants - [ ] Edit a theme color (e.g. \`ghostty/bases\`), re-run build, confirm the mockup updates and the golden test fails with a useful diff (then \`task site:golden\` to accept)
arne added 23 commits 2026-04-27 13:37:48 +02:00
Brainstorming output for the bases/themes showcase site at themes.bas.es:
landing + seven per-app pages, hand-built HTML mockups whose colors are
parsed from the actual theme files in this repo, deployed via bases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fifteen-task plan covering generator scaffold, seven per-app sub-packages
(parser + mockup), site chrome, landing page, theme toggle, golden tests,
Basefile deployment, and docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds bases and bases-light TOML themes for the Helix editor, with
README and CLAUDE.md entries documenting the new target. Also
adjusts tmux status-right to use the accent and amber tokens for
better legibility against the muted status bar.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The regex already captures up to the closing semicolon, so leading/
trailing whitespace is the only thing that needs cleaning. The previous
trimValue removed all interior whitespace too, which would silently
mangle multi-arg CSS values like rgba(0, 0, 0, 0.5).
Per code-review I-2: a permission/IO failure on one of the 20 woff2
files now reports the offending path instead of a bare error string.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each app's Render parses its theme files; calling it once per app and
reusing the result keeps total parse cost at one pass per app rather
than two. Becomes more meaningful as Tasks 6-11 add six more apps.
theme.js adds the .theme-transitioning class on the html element for
~300ms during a theme flip. Without this CSS rule the class was a
no-op; with it, the chrome and mockups fade between light and dark
together for a more polished feel.
Installs Go and Caddy, clones the repo, runs the generator to produce
the static site, then serves it on :8080. Final URL is provided by
bases/Caddy at the host level via the *.bas.es wildcard.
- README links to themes.bas.es and explains the cmd/site/ generator
- CLAUDE.md adds a 'Website' section explaining how mockups are derived
- Taskfile.yaml provides site:build, site:serve, site:test, site:golden
- .gitignore distinguishes the stray binary from the generator output dir
- site/ contains the initial build (1 landing + 7 app pages + assets)
Applies four follow-ups from the final code review:

1. Extract cmd/site/internal/testroot.Find — collapses seven near-duplicate
   repoRoot helpers across parser_test.go files into a single shared one.
2. Add cmd/site/internal/colorcheck.IsColor — every parser now validates
   that captured values look like real colors (#hex or rgb()), not stray
   CSS fragments. Defense-in-depth against silently-broken builds.
3. Add a TODO sync comment on forgejoURL in both main.go and Basefile so
   the two placeholder URLs stay aligned.
4. Make the hero-app selection (cards[0]) explicit with a comment about
   the Apps[0] terminal-style invariant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the codeberg.org placeholder with the actual repo URL.
Updates rendered HTML (header source link + footer source link),
so golden testdata regenerated.
arne merged commit 39803a82af into main 2026-04-27 13:39:40 +02:00
arne deleted branch feat/website 2026-04-27 13:39:41 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bases/themes!1
No description provided.