Add 4 switchable themes (Anthropic / Instrument / Editorial / Retro CRT)

- @fontsource-variable/{fraunces,jetbrains-mono,newsreader} + @fontsource/{dm-sans,ibm-plex-mono} bundled offline.
- styles.css restructured: theme-agnostic base + 4 [data-theme="..."] overrides driving CSS custom props (--bg, --fg, --accent, --font-display, --font-body, --atmosphere).
- Each theme has its own typographic + chromatic personality:
  * Anthropic: warm cream-on-charcoal, Newsreader display + DM Sans body, sunset orange + claude purple.
  * Instrument: synth panel, JetBrains Mono throughout, chartreuse on slate, ring tick marks, faint scanlines, bracket corners on title bar.
  * Editorial: magazine artifact, Fraunces variable serif (opsz axis), saffron on warm charcoal, hairline rules.
  * Retro CRT: phosphor green on near-black, IBM Plex Mono, scanlines + vignette, blink-cursor in corner, [bracketed] header label.
- Settings panel: 4-up theme picker (each card renders a sample percentage in that theme's actual fonts/colors). Click = live preview; Cancel reverts; Save persists.
- BlockRing big % bumped to 38px logical with theme-specific font-variation-settings.
- TitleBar voice differs per theme without changing underlying string.
- Default theme: Anthropic (warmest first impression).
This commit is contained in:
megaproxy 2026-05-09 15:43:57 +01:00
parent 5200caf21f
commit 8a7ebd60b1
9 changed files with 575 additions and 39 deletions

View file

@ -42,6 +42,8 @@ pub struct Settings {
pub claude_command: Option<String>,
/// How often (seconds) to refetch `/usage`. Defaults to 300 (5 min).
pub cli_refresh_secs: u64,
/// One of: "anthropic" (default), "instrument", "editorial", "retro".
pub theme: String,
}
impl Default for Settings {
@ -54,6 +56,7 @@ impl Default for Settings {
autostart: false,
claude_command: None,
cli_refresh_secs: 300,
theme: "anthropic".to_string(),
}
}
}