From cb3bf48c066c9cc8f22d1aff8597368e6b26534f Mon Sep 17 00:00:00 2001 From: Alex Dunmow Date: Fri, 20 Nov 2026 06:39:13 +0800 Subject: [PATCH] fix: website factory render pass polish (0.4.8) Hero scrim, button and preset contrast and layout fixes found by the WO-096 render pass; see docs/adr. Co-Authored-By: Claude Fable 5.2 --- assets/style.css | 2 +- ...0004-the-hero-scrim-lets-the-photo-show.md | 20 +++++++++++++++++++ manifest.yaml | 2 +- presets.json | 18 ++++++++--------- templates/overrides/terminal/hero.ninjatpl | 2 +- 5 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 docs/adr/0004-the-hero-scrim-lets-the-photo-show.md diff --git a/assets/style.css b/assets/style.css index 604bda1..e2e95a1 100644 --- a/assets/style.css +++ b/assets/style.css @@ -40,7 +40,7 @@ max-width: 80ch; } -.terminal-prose a { +.terminal-prose a:not([class]) { color: hsl(var(--accent)); text-decoration: underline; text-underline-offset: 0.2em; diff --git a/docs/adr/0004-the-hero-scrim-lets-the-photo-show.md b/docs/adr/0004-the-hero-scrim-lets-the-photo-show.md new file mode 100644 index 0000000..30467bc --- /dev/null +++ b/docs/adr/0004-the-hero-scrim-lets-the-photo-show.md @@ -0,0 +1,20 @@ +# The hero scrim lets the photo show + +Decided 2026-11-20 for terminal 0.4.8, from the website factory's final render pass (orchestrator WO-096, ADR 0084). + +## Context + +The website factory compiles a customer's site onto this theme. The render pass screenshots every page at 1280 and 390 pixels and measures text over images and every button against what is behind it. + +## Decision + +- The light hero scrim is a radial gradient of the theme background centred on the hero text (at 35% across for the left-aligned hero): 84% at the centre, 80% out to 55% of the radius and 40% at the corners. The flat 82% scrim of the last release met contrast but washed the photo out; the text keeps the same backing while the photo reads at the edges. The render harness measures every text element over the photo (orchestrator WO-096). +- Every preset's primary, secondary, accent and destructive colour meets AA (4.5:1) with its foreground in both schemes. The render pass measures every button, and these pairs were under it: amber-crt dark destructive; amber-crt light accent; amber-crt light primary; ice-terminal dark destructive; ice-terminal light accent; magenta-hacker dark destructive; paper-tty dark destructive; phosphor-green dark destructive. Each colour moved the least lightness (at most ten points) that reaches 4.5 with its own foreground, and a colour that could not switched its foreground to white or near-black; a token that held the same colour (the ring) moved with it. The orchestrator's brand colour step keeps whatever contrast a preset has, so a preset under AA also left a branded site under it. +- Prose link colours (`.terminal-prose a`, in both the manifest CSS and `assets/style.css`) apply only to links without their own classes. The default page template wraps every section in the prose styles, so the blog index's active filter pill drew its label in the accent on its own dark fill. + +## Consequences + +- terminal 0.4.8 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it. +- No schema field changes. + +Keywords: terminal-prose, filter pill, presets, AA, button contrast, primaryForeground, accentForeground, terminal, hero, overlayColor, scrim, radial-gradient, contrast, WO-096, website factory, render pass diff --git a/manifest.yaml b/manifest.yaml index 62c7e70..beb1735 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -166,7 +166,7 @@ css: line-height: 1.7; } - .terminal-prose a { + .terminal-prose a:not([class]) { color: hsl(var(--accent)); text-decoration: underline; text-underline-offset: 0.2em; diff --git a/presets.json b/presets.json index 067e9bd..9cc84ec 100644 --- a/presets.json +++ b/presets.json @@ -46,7 +46,7 @@ "mutedForeground": "120 40% 50%", "accent": "120 100% 60%", "accentForeground": "0 0% 4%", - "destructive": "0 90% 55%", + "destructive": "0 90% 48%", "destructiveForeground": "0 0% 100%", "border": "120 60% 25%", "input": "120 50% 18%", @@ -72,19 +72,19 @@ "cardForeground": "30 25% 15%", "popover": "40 30% 99%", "popoverForeground": "30 25% 15%", - "primary": "30 80% 40%", + "primary": "30 80% 37%", "primaryForeground": "40 30% 98%", "secondary": "38 25% 90%", "secondaryForeground": "30 25% 22%", "muted": "40 20% 91%", "mutedForeground": "30 15% 40%", - "accent": "25 85% 43%", + "accent": "25 85% 39%", "accentForeground": "40 30% 98%", "destructive": "0 70% 45%", "destructiveForeground": "0 0% 100%", "border": "38 20% 78%", "input": "38 20% 84%", - "ring": "30 80% 40%" + "ring": "30 80% 37%" }, "darkColors": { "background": "30 20% 4%", @@ -101,7 +101,7 @@ "mutedForeground": "38 50% 50%", "accent": "45 100% 60%", "accentForeground": "30 20% 4%", - "destructive": "0 90% 55%", + "destructive": "0 90% 48%", "destructiveForeground": "0 0% 100%", "border": "38 60% 28%", "input": "38 50% 20%", @@ -157,7 +157,7 @@ "accent": "60 100% 70%", "accentForeground": "0 0% 5%", "destructive": "0 90% 60%", - "destructiveForeground": "0 0% 100%", + "destructiveForeground": "0 0% 9%", "border": "0 0% 30%", "input": "0 0% 18%", "ring": "0 0% 95%" @@ -188,7 +188,7 @@ "secondaryForeground": "200 40% 20%", "muted": "200 20% 92%", "mutedForeground": "200 15% 40%", - "accent": "185 85% 32%", + "accent": "185 85% 29%", "accentForeground": "200 30% 98%", "destructive": "0 70% 45%", "destructiveForeground": "0 0% 100%", @@ -211,7 +211,7 @@ "mutedForeground": "185 40% 52%", "accent": "175 95% 55%", "accentForeground": "200 40% 5%", - "destructive": "0 85% 55%", + "destructive": "0 85% 50%", "destructiveForeground": "0 0% 100%", "border": "190 60% 26%", "input": "190 50% 18%", @@ -266,7 +266,7 @@ "mutedForeground": "320 40% 55%", "accent": "285 90% 62%", "accentForeground": "300 25% 5%", - "destructive": "0 85% 58%", + "destructive": "0 85% 50%", "destructiveForeground": "0 0% 100%", "border": "320 55% 28%", "input": "320 45% 20%", diff --git a/templates/overrides/terminal/hero.ninjatpl b/templates/overrides/terminal/hero.ninjatpl index 32a5dcd..5a61a0c 100644 --- a/templates/overrides/terminal/hero.ninjatpl +++ b/templates/overrides/terminal/hero.ninjatpl @@ -33,7 +33,7 @@ {% set align = "center" %} {% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
-{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}{% else %}
{% endif %} +{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}{% else %}
{% endif %}
{{ herocontent(align) }}