Skip to content

Add night mode theme with toggle#147

Open
arifibayrak wants to merge 1 commit into
meltylabs:mainfrom
arifibayrak:1-start-here-e56de7a7
Open

Add night mode theme with toggle#147
arifibayrak wants to merge 1 commit into
meltylabs:mainfrom
arifibayrak:1-start-here-e56de7a7

Conversation

@arifibayrak

Copy link
Copy Markdown

Adds a night mode theme to the train dispatcher page (index.html).

What's included

  • Dark palette — a :root[data-theme="dark"] block overrides the existing CSS variables (background, ink, muted text, borders, glass panels, steam-puff color, button hover states). Refactored the last hardcoded colors into variables so everything themes cleanly.
  • Theme toggle button — a 🌙/☀️ pill button next to the mute button, sharing its styling, with aria-label/aria-pressed.
  • Persistence — choice saved to localStorage (wtc:theme) and restored on load with no flash.
  • OS default — first visit respects the system prefers-color-scheme: dark setting.
  • Keyboard shortcut — press T to toggle (matching M-for-mute), plus color-scheme and theme-color meta updates so browser chrome matches.

Verification

Served locally and confirmed end-to-end: light mode renders as before, the moon flips the page to dark, and after a full reload it loads directly in night mode with no flash and no console errors. All contained in the single index.html file.

🤖 Generated with Claude Code

Add a dark theme to the train dispatcher: a themeable dark palette,
a moon/sun toggle button, "T" keyboard shortcut, localStorage
persistence, and OS prefers-color-scheme as the default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@arifibayrak arifibayrak requested a review from mattppal as a code owner July 8, 2026 21:04
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

1 participant