Skip to content

Landing: light + dark mode with a header toggle#5

Merged
btravers merged 1 commit into
mainfrom
feat/landing-light-dark
Jun 27, 2026
Merged

Landing: light + dark mode with a header toggle#5
btravers merged 1 commit into
mainfrom
feat/landing-light-dark

Conversation

@btravers

Copy link
Copy Markdown
Contributor

Follow-up to the merged landing PR (this commit was stranded after that merge).

Makes the bespoke landing scheme-aware:

  • System by default — keeps VitePress's appearance: true, so the landing follows the visitor's OS preference.
  • Header toggle — a sun/moon button wired to VitePress's isDark lets visitors override light/dark (persisted). Needed because the landing uses layout: false, so VitePress's own nav toggle isn't present.
  • Scheme-aware styling scoped to .btv (light surfaces/text/borders + a deeper-pink accent for contrast on white). Code blocks stay dark "terminal" panels in both modes. The shared @btravstack/theme package is untouched.

Verified: system dark + system light render correctly and the toggle flips the theme; lockfile unchanged (--frozen-lockfile clean); turbo build passes.

🤖 Generated with Claude Code

The bespoke landing was dark-only. Make it scheme-aware (light surface /
text / border / accent values scoped to .btv), keep VitePress's default
system appearance, and add a sun/moon toggle in the header wired to
VitePress's isDark so visitors can override light/dark (persisted). Code
blocks stay dark terminals in both schemes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 27, 2026 15:40
@btravers btravers merged commit dc1f852 into main Jun 27, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the bespoke VitePress landing page to support light/dark appearance consistently by integrating with VitePress’s built-in appearance state and adding landing-scoped theme variables.

Changes:

  • Adds a header sun/moon toggle wired to VitePress useData().isDark (persisted by VitePress).
  • Introduces landing-scoped light-mode CSS variable overrides (while keeping the existing dark look as the default token baseline).
  • Adjusts several landing component styles (glass header, hover surfaces, pills, footer, and code-block styling) to be scheme-aware.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<a class="navlink nav-hide" href="#philosophy">Philosophy</a>
<a class="navlink nav-hide" href="#projects" style="margin-right:6px">Projects</a>
<ClientOnly>
<button type="button" class="btv-toggle" :title="isDark ? 'Switch to light' : 'Switch to dark'" :aria-label="isDark ? 'Switch to light theme' : 'Switch to dark theme'" @click="toggleAppearance">
btravers added a commit that referenced this pull request Jun 27, 2026
- style.css: inline code (--vp-code-color) now uses --text-accent so it
  stays readable on the scheme-aware code inset (was --bt-pink-soft, which
  was low-contrast on the light code wash). [Copilot, PR #6]
- Landing.vue: add aria-pressed to the appearance toggle so assistive tech
  announces the current state. [Copilot, PR #5]

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@btravers btravers deleted the feat/landing-light-dark branch June 27, 2026 23:49
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.

2 participants