Skip to content

feat(www): add light mode toggle and fix command copy buttons#41

Merged
jal-co merged 1 commit into
mainfrom
feat/site-light-mode-and-copy-button
Jun 15, 2026
Merged

feat(www): add light mode toggle and fix command copy buttons#41
jal-co merged 1 commit into
mainfrom
feat/site-light-mode-and-copy-button

Conversation

@jal-co

@jal-co jal-co commented Jun 15, 2026

Copy link
Copy Markdown
Owner

What

Adds a light/dark theme toggle to scnstack.sh and fixes the command copy buttons.

  • Theme toggle in the header (sun/moon) plus a global D keyboard shortcut to switch themes (ignored while typing in inputs / with modifiers).
  • Replaced hard-coded zinc/white-alpha utilities with semantic tokens across the header, footer, hero, sponsor page, and the npm/GitHub pills, so the whole site responds to the active theme.
  • Made the hero surfaces, gradients, and marquee fades theme-aware.
  • Fixed illegible light-mode code blocks — Shiki renders with defaultColor: false, so token colors now switch via --shiki-light / --shiki-dark per color mode.
  • Reworked the hero command copy button to show a Copy / Copied label with a robust clipboard helper (execCommand fallback for non-secure contexts) and accessible states.
  • Made the builder command box click-to-copy with a prominent full-width Copy command button.

Why

The landing page was dark while the builder was light, which was jarring ("flashbanging") when navigating between them, and there was no way to choose a theme. The hero copy button was an icon-only gray box that read as disabled/unintuitive, and code samples were unreadable once a light theme was applied.

Closes #

Type

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation
  • refactor — Code restructuring
  • perf — Performance improvement
  • style — Formatting / code style
  • chore — Maintenance / deps
  • ci — CI/CD changes
  • test — Tests

Checklist

  • Branch follows conventional naming (feat/, fix/, docs/, etc.)
  • Commits follow Conventional Commits
  • npm run lint passes (tsc --noEmit in www/)
  • npm test passes (no CLI changes in this PR; site-only)
  • Tests added or updated (if changing behaviour)
  • Docs updated (if changing flags, prompts, or generator output)

Screenshots

Verified in a real browser (light + dark) on the homepage, builder, and docs:

  • Homepage hero — light & dark, with the new labeled Copy button and theme toggle
  • Builder — now follows the theme; command box is click-to-copy + "Copy command" button
  • Docs — code blocks legible in both themes (Shiki light/dark token fix)

(Screenshots captured locally during review; happy to attach to the PR thread.)

Add a light/dark theme toggle and "D" keyboard shortcut, and make the
site chrome theme-aware so the landing page, builder, sponsor, and docs
no longer mismatch between dark and light modes.

- Add ThemeToggle (next-themes) to the header; "D" toggles the theme
  globally (ignored while typing in inputs)
- Replace hard-coded zinc/white-alpha utilities with semantic tokens
  across header, footer, hero, sponsor, npm/github pills
- Make hero surfaces, gradients, and marquee fades theme-aware
- Fix illegible light-mode code: switch Shiki dual-theme token colors
  via --shiki-light / --shiki-dark per color mode
- Rework the hero copy button to show a Copy/Copied label with a robust
  clipboard helper (execCommand fallback) and accessible states
- Make the builder command box click-to-copy with a prominent
  "Copy command" primary button
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
scn-stack Ready Ready Preview, Comment Jun 15, 2026 2:44am

Request Review

@github-actions github-actions Bot added feature New feature or enhancement website Changes to www/ (scnstack.sh) labels Jun 15, 2026
@jal-co jal-co merged commit c2633c1 into main Jun 15, 2026
5 checks passed
@jal-co jal-co deleted the feat/site-light-mode-and-copy-button branch June 15, 2026 03:44
@jal-co jal-co mentioned this pull request Jun 15, 2026
15 tasks
jal-co added a commit that referenced this pull request Jun 15, 2026
## What

Release **v0.12.1** — a patch bump in `package.json` (and lockfile) to
ship the merged CLI fixes to npm.

## Why

[#42](#42) is on `main` but not
yet published, so users still get the old behaviour (required prompts +
the `mkdir '/orc'` crash). This bump lets a GitHub Release publish the
fix.

Since the package is in initial development (`0.y.z`) and #42 is a bug
fix, this is a **PATCH** bump per [SemVer](https://semver.org/) —
`0.12.0 → 0.12.1`.

### Included since v0.12.0

- `fix(cli): make project location + github repo optional, guard bad
dirs` (#42)
  - Project location optional (falls back to `./<name>`)
  - GitHub `owner/repo` optional (`<owner>/<name>` placeholder)
- Refuse out-of-tree scaffold dirs instead of crashing with `mkdir
ENOENT`

> Note: #41 (website light mode) is `www/`-only and ships via Vercel —
not part of the npm package.

## How

`npm version 0.12.1 --no-git-tag-version` (the `vX.Y.Z` tag is created
by the GitHub Release, which triggers `publish.yml`).

## Type

- [ ] `feat` — New feature
- [ ] `fix` — Bug fix
- [ ] `docs` — Documentation
- [ ] `refactor` — Code restructuring
- [ ] `perf` — Performance improvement
- [ ] `style` — Formatting / code style
- [x] `chore` — Maintenance / deps
- [ ] `ci` — CI/CD changes
- [ ] `test` — Tests

## Checklist

- [x] Branch follows conventional naming (`release/`)
- [x] Commits follow [Conventional
Commits](https://www.conventionalcommits.org/)
- [x] `npm run lint` passes
- [x] `npm test` passes (103 tests)
- [ ] Tests added or updated (n/a — version bump only)
- [ ] Docs updated (n/a)

## Release steps (after merge)

1. Merge this PR (release branches use a **merge commit**).
2. Create a GitHub Release tagged `v0.12.1` targeting `main` →
`publish.yml` lints, builds, tests, and runs `npm publish --provenance`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement website Changes to www/ (scnstack.sh)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant