diff --git a/CLAUDE.md b/CLAUDE.md index ca9a6022..b09873c8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -85,7 +85,11 @@ connection is configured in `db/index.ts`. `interactions.css`, then the rail, explorer, player and episode page (`rail.css`, `explorer.css`, `player.css`, `episode.css`). Prefer Tailwind utilities for new work; the palette is exposed as Tailwind colors via - `@theme inline` in `tailwind.css`. + `@theme inline` in `tailwind.css`. The type, leading, measure, blur, + tracking, weight, shadow and radius scales are Starpod's own (`text-sm` + is 13px, `font-demibold` is 650, `rounded-card` is `--r-card`) and live in + `tailwind.css`; use those named steps rather than arbitrary values, and + `var(--text-sm)` and the like in the stylesheets. - Video comes from the feed's `` (HLS or another video type), and people from its `` tags; `rss-to-json` drops both, so `src/lib/feed-media.ts` scans the raw XML. diff --git a/packages/starpod/.impeccable/design.json b/packages/starpod/.impeccable/design.json index 8c4bbaf4..5ebf02db 100644 --- a/packages/starpod/.impeccable/design.json +++ b/packages/starpod/.impeccable/design.json @@ -435,9 +435,9 @@ "oklch(95% 0.02 273)" ] }, - "on-media-chip": { + "on-media": { "role": "neutral", - "displayName": "On-Media Chip", + "displayName": "On Media", "canonical": "oklch(98% 0.005 285)", "tonalRamp": [ "oklch(15% 0.005 285)", @@ -465,6 +465,14 @@ "oklch(95% 0.04 285)" ] }, + "media-shade": { + "role": "neutral", + "displayName": "Media Shade", + "canonical": "oklch(15% 0.02 280)", + "tonalRamp": [ + "oklch(15% 0.02 280)" + ] + }, "media-glass": { "role": "neutral", "displayName": "Media Glass", @@ -743,7 +751,7 @@ }, { "name": "The One Palette Rule", - "body": "Starpod's styles use only the token colours above, which Tailwind's theme exposes as utilities. Tailwind's default palette is still loaded but is not part of the system (the show notes' heading dots are the one place that still uses it). There are no parallel light/dark colour pairs; a single token class follows both schemes.", + "body": "Starpod's styles use only the token colours above, which Tailwind's theme exposes as utilities. Tailwind's default palette is still loaded, but nothing uses it; the typography plugin's prose takes the tokens too. There are no parallel light/dark colour pairs; a single token class follows both schemes.", "section": "colors" }, { diff --git a/packages/starpod/DESIGN.md b/packages/starpod/DESIGN.md index a1173521..c37a47ff 100644 --- a/packages/starpod/DESIGN.md +++ b/packages/starpod/DESIGN.md @@ -32,8 +32,9 @@ colors: on-ink-night: "oklch(16% 0.03 270)" media-ground-day: "oklch(19% 0.03 280)" media-ground-night: "oklch(9% 0.02 273)" - on-media-chip: "oklch(98% 0.005 285)" + on-media: "oklch(98% 0.005 285)" on-media-ink: "oklch(20% 0.04 285)" + media-shade: "oklch(15% 0.02 280)" media-glass: "oklch(15% 0.02 280 / 0.72)" hairline-day: "oklch(24% 0.05 292 / 0.1)" hairline-night: "oklch(97.65% 0.005 274.97 / 0.1)" @@ -168,7 +169,7 @@ components: rounded: "{rounded.pill}" size: "44px" stage-play: - backgroundColor: "{colors.on-media-chip}" + backgroundColor: "{colors.on-media}" textColor: "{colors.on-media-ink}" rounded: "{rounded.pill}" size: "clamp(56px, 6vw, 76px)" @@ -249,7 +250,7 @@ Cool violet-grey neutrals carrying two rationed accents: Iris (violet) owns the - **Ground / Surface / Raised** (day and night): page ground, then the shell panels, cards, and fields, then hover fills and keyboard hints. All are faintly violet-tinted so neither scheme reads as dead grey. - **Line / Line Strong**: hairline dividers and every default border (a bare `border` resolves to Line). Line Strong is for secondary-button and switch borders and the breadcrumb chevron. - **Ink / Text / Muted**: headings and primary controls, then body, then metadata and secondary labels. **On Ink** is the text on ink-filled controls and flips with the scheme. **On Glow** is the text on the gradient fill (ink by day, on-ink by night). -- **Media Ground** (media-ground-day / -night): the near-black field behind video and artwork in the stage frame and the floating picture. **On-Media Chip / Ink** form the fixed light play disc over media, and **Media Glass** is the translucent dark "Resume at" chip beside it; all three ignore the scheme. +- **Media Ground** (media-ground-day / -night): the near-black field behind video and artwork in the stage frame and the floating picture. **On Media** (`--on-media`) is light text and the play disc over media, with **On-Media Ink** on the disc. **Media Shade** (`--media-shade`) is the one dark for everything over or lifted off media: glass chips, scrims behind sheets and the player card, and the deeper shadows, each a `color-mix()` of it at the strength it needs. **Media Glass** (`--media-glass`, Media Shade at 72%) is the usual chip, like "Resume at". All of these ignore the scheme, and Tailwind has them as `on-media`, `on-media-ink`, `media-shade` and `media-glass`, beside the Iris and Aqua steps (`iris-200`, `aqua-200`…). ### Named Rules **The Two Lamps Rule.** Iris is the only accent by day and Aqua the only accent by night. Accent fills are limited to interaction, the current item, and playback, and never decorate resting content. @@ -258,7 +259,7 @@ Cool violet-grey neutrals carrying two rationed accents: Iris (violet) owns the **The OKLCH Only Rule.** Every colour is authored in OKLCH, including shadows, masks, and backdrops. Hex and rgb are never used. -**The One Palette Rule.** Starpod's styles use only the token colours above, which Tailwind's theme exposes as utilities. Tailwind's default palette is still loaded, but is not part of the system (the show notes' heading dots are the one place that still uses it). There are no parallel light/dark colour pairs; a single token class follows both schemes. +**The One Palette Rule.** Starpod's styles use only the token colours above, which Tailwind's theme exposes as utilities. Tailwind's default palette is still loaded, but nothing uses it; the typography plugin's prose takes the tokens too. There are no parallel light/dark colour pairs; a single token class follows both schemes. ## Typography diff --git a/packages/starpod/README.md b/packages/starpod/README.md index 8f86d255..d22721a6 100644 --- a/packages/starpod/README.md +++ b/packages/starpod/README.md @@ -110,12 +110,17 @@ starpod(starpodConfig, { database: true, // Replace built-in components with your own. components: { Hosts: './src/components/MyHosts.astro' }, - // Stylesheets loaded after the built-in ones — override the theme's CSS - // custom properties here. + // Stylesheets loaded after the built-in ones — set the theme's CSS + // variables here (see Theming). customCss: ['./src/styles/theme.css'] }); ``` +For a different look, set the theme's variables (see Theming). For +different markup or behaviour, override the component. Class names inside +the built-in components aren't part of the API and can change between +releases, so don't style against them. + Overridable components: `Breadcrumbs`, `EpisodeList`, `Hosts`, `InfoCard`, `LargePlatforms`, `NotFoundContent`, `Platforms`, `ShowArtwork`. @@ -151,6 +156,83 @@ in a ``, as the built-in does. The icon sidebar then shows the icon alone and names the link in a tooltip. A link with bare text keeps its text, cut to the icon column, and is still named by the tooltip. +## Theming + +Everything Starpod draws reads its values from CSS variables on `:root`: +the built-in stylesheets with `var(--accent)`, and the Tailwind utilities +too (`bg-accent` compiles to `background: var(--accent)`, `text-sm` to +`font-size: var(--text-sm)`). Set the variables in a stylesheet listed in +`customCss`, and both pick them up: + +```css +/* src/styles/theme.css */ +:root { + --iris-500: oklch(62% 0.19 25); + --iris-700: oklch(48% 0.17 25); + --font-ui: 'Inter', ui-sans-serif, system-ui, sans-serif; + --r-card: 12px; +} +``` + +The stylesheet loads after Starpod's, so a plain `:root` rule wins in both +the light and the dark scheme. To change one scheme only, wrap the rule in +`@media (prefers-color-scheme: dark)`, as Starpod's own `tokens.css` does. +A font you name in `--font-ui` needs its own `@font-face` or `@import` in +the same stylesheet. + +### Colour + +Write colours in OKLCH, as the built-in palette does. + +- **Accent scales:** `--iris-100` to `--iris-700` (the light scheme's + accent) and `--aqua-100` to `--aqua-700` (the dark scheme's). Changing a + scale re-colours that scheme's accents. The one exception is the dark + scheme's `--accent-soft`, a deep tint of its own, so set it alongside the + aqua scale. +- **Surfaces and text, set per scheme:** `--ground` (the page), + `--surface`, `--raised`, `--line`, `--line-strong`, `--ink` (headings and + primary text), `--text`, `--muted`, `--on-ink` (text on an `--ink` + fill). +- **Accent roles:** `--accent`, `--accent-ink`, `--accent-soft`, the + `--glow-a`/`--glow-b` gradient and `--on-glow` (text on it), and + `--voice-0`/`--voice-1` (the two hosts' transcript colours). +- **Over video and artwork, the same in both schemes:** `--on-media`, + `--on-media-ink`, `--media-shade`, `--media-glass`, `--media-ground`. +- **Effects:** `--hairline` (the edge drawn over images), and the + `--shadow-soft` and `--shadow-float` shadows. + +### Type + +- **Fonts:** `--font-ui` (everything), `--font-display` (the large display + titles, the UI font by default), and `--font-voice-0`/`--font-voice-1` (the two hosts' + transcript lines). +- **Sizes:** `--text-3xs` (10px), `--text-2xs` (11px), `--text-xs` (12px), + `--text-sm` (13px, most UI text), `--text-md` (14px), `--text-base` (15px), + `--text-lg` (16px, body), `--text-xl` (17px), `--text-2xl` (18px) and + `--text-3xl` (21px). These are Starpod's own steps, not Tailwind's + defaults. The large display headings scale with the viewport and don't + use a step. +- **Line heights:** `--leading-none` (1), `--leading-tight` (1.2), + `--leading-snug` (1.3), `--leading-normal` (1.45), `--leading-relaxed` + (1.75). +- **Weights:** `--font-weight-normal` (400) to `--font-weight-black` (900). + They include `--font-weight-demibold` (650) and `--font-weight-heavy` + (850). +- **Letter spacing:** `--tracking-tight` and `--tracking-snug`. + +### Shape and motion + +- **Radii:** `--radius` (chrome) and `--radius-frame` (the media frame). + Components nest from `--r-thumb` (12px) to `--r-row`, `--r-tile`, + `--r-tray` and `--r-card` (28px). Each inner radius is its container's + radius minus the gap between them, so change them together. +- **Easing:** `--ease-out` and `--ease-spring`, and `--quick` for small + colour changes. + +Layout measurements such as `--rail-w`, `--topbar-h` and `--gutter` are +also variables, but the layout's geometry depends on them, so they aren't +meant for theming. + ## Custom pages Starpod injects the core routes; anything else is a normal Astro page in diff --git a/packages/starpod/cli/template/base/README.md b/packages/starpod/cli/template/base/README.md index 9e686ac5..38682845 100644 --- a/packages/starpod/cli/template/base/README.md +++ b/packages/starpod/cli/template/base/README.md @@ -34,10 +34,13 @@ Pass options as the second argument to `starpod()` in `astro.config.mjs`: [Turso](https://turso.tech) (see `.env.example`). When off, those sections simply don't render. - `components: { Hosts: './src/components/MyHosts.astro' }` — replace built-in - components with your own. Overridable: Dots, EpisodeList, Hosts, InfoCard, - LargePlatforms, NotFoundContent, Platforms, ShowArtwork. + components with your own. Overridable: Breadcrumbs, EpisodeList, Hosts, + InfoCard, LargePlatforms, NotFoundContent, Platforms, ShowArtwork. - `customCss: ['./src/styles/theme.css']` — stylesheets loaded after the - built-in styles, for theming via CSS custom properties. + built-in styles. Set the theme's CSS variables there (`--accent`, + `--font-ui`, `--r-card`, `--text-sm` and the rest) to restyle the site; + the built-in CSS and the Tailwind utilities both read them. See Theming in + the Starpod README for the full list. ## Custom pages diff --git a/packages/starpod/src/components/AdPackageCard.astro b/packages/starpod/src/components/AdPackageCard.astro index d90835ec..5846c54a 100644 --- a/packages/starpod/src/components/AdPackageCard.astro +++ b/packages/starpod/src/components/AdPackageCard.astro @@ -8,9 +8,9 @@ export interface Props { const { bullets, heading, price } = Astro.props; --- -
+

{heading}

@@ -23,15 +23,15 @@ const { bullets, heading, price } = Astro.props; }

{price} / - + per episode

@@ -39,7 +39,7 @@ const { bullets, heading, price } = Astro.props; {status.state === 'error' && ( - )}
) : (
-

- All episodes {episodes.length} +

+ All episodes{' '} + + {episodes.length} +

@@ -54,7 +60,10 @@ const { cards, episodes, people, show, years } = Astro.props; {/* Only boxes: what shows in it belongs to the open card, so it is no landmark of its own. */}