fix: website factory render pass polish (0.5.7)

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 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-11-20 06:39:12 +08:00
parent 0b34701a55
commit 3f7026b01f
7 changed files with 35 additions and 11 deletions

View File

@ -0,0 +1,21 @@
# Pages read wider, and sections keep real headings
Decided 2026-11-20 for editorial 0.5.7, 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).
- The default page template lays sections out in a 76rem column (`editorial-column--page`) without the article prose styles; the 64ch measure, the paragraph indent and the prose link colours stay for articles. About, contact and blog pages squeezed every section into the article measure, indented every second paragraph of a section and drew the active blog filter pill's label in the accent on its dark fill (1.9:1). Prose link colours now apply only to links without their own classes.
- Rich section and team headings are serif display headings at their stated size. The tracked small-caps label class set them at 0.72rem, so an inner page had no visible heading.
- 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: book-paper dark accent; book-paper dark destructive; legal-pad dark destructive; nightdesk dark destructive; sepia-review 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.
## Consequences
- editorial 0.5.7 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it.
- No schema field changes.
Keywords: prose-editorial, category filter, pill, presets, AA, button contrast, primaryForeground, accentForeground, editorial, default template, editorial-column, editorial-column--page, rich-section, team, heading, editorial-caps, hero, scrim, radial-gradient, WO-096, website factory, render pass

View File

@ -148,6 +148,9 @@ css:
padding-left: 1rem;
padding-right: 1rem;
}
.editorial-column--page {
max-width: 76rem;
}
.editorial-article-grid {
display: grid;
grid-template-columns: 1fr;
@ -198,7 +201,7 @@ css:
letter-spacing: -0.01em;
color: hsl(var(--foreground));
}
.prose-editorial a {
.prose-editorial a:not([class]) {
color: hsl(var(--accent));
text-decoration: underline;
text-decoration-thickness: 1px;

View File

@ -43,13 +43,13 @@
"secondaryForeground": "36 20% 80%",
"muted": "26 8% 16%",
"mutedForeground": "34 12% 58%",
"accent": "6 62% 56%",
"accent": "6 62% 57%",
"accentForeground": "26 10% 10%",
"destructive": "0 68% 52%",
"destructive": "0 68% 45%",
"destructiveForeground": "36 22% 88%",
"border": "28 8% 22%",
"input": "28 8% 20%",
"ring": "6 62% 56%"
"ring": "6 62% 57%"
}
}
},
@ -99,7 +99,7 @@
"mutedForeground": "32 16% 60%",
"accent": "18 68% 54%",
"accentForeground": "24 18% 10%",
"destructive": "0 68% 52%",
"destructive": "0 68% 44%",
"destructiveForeground": "34 30% 86%",
"border": "26 14% 23%",
"input": "26 14% 21%",
@ -153,7 +153,7 @@
"mutedForeground": "40 12% 58%",
"accent": "8 64% 55%",
"accentForeground": "220 12% 9%",
"destructive": "0 68% 52%",
"destructive": "0 68% 45%",
"destructiveForeground": "44 20% 88%",
"border": "220 10% 21%",
"input": "220 10% 19%",
@ -207,7 +207,7 @@
"mutedForeground": "40 10% 60%",
"accent": "352 70% 58%",
"accentForeground": "222 16% 9%",
"destructive": "0 70% 54%",
"destructive": "0 70% 46%",
"destructiveForeground": "40 16% 90%",
"border": "222 12% 22%",
"input": "222 12% 20%",

View File

@ -5,7 +5,7 @@
{{ admin_banner_html|safe }}
{% if slots.header %}<header class="w-full">{{ slots.header|safe }}</header>{% endif %}
<main class="flex-grow w-full py-10 md:py-14">
{% if slots.main %}<div class="editorial-column prose-editorial">{{ slots.main|safe }}</div>{% else %}<div class="editorial-column py-20 text-center"><p style="color: hsl(var(--muted-foreground));">No content blocks assigned to this page.</p></div>{% endif %}
{% if slots.main %}<div class="editorial-column editorial-column--page">{{ slots.main|safe }}</div>{% else %}<div class="editorial-column py-20 text-center"><p style="color: hsl(var(--muted-foreground));">No content blocks assigned to this page.</p></div>{% endif %}
</main>
{% if slots.footer %}<footer class="w-full mt-auto">{{ slots.footer|safe }}</footer>{% endif %}
{{ body_end_html|safe }}

View File

@ -33,7 +33,7 @@
{% set align = "center" %}
{% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
<section data-block-override="editorial:hero" class="hero relative flex flex-col overflow-hidden bg-background text-foreground {% if hasImage %}{% if minHeight == "screen" %}min-h-screen{% elif minHeight == "50vh" %}min-h-[50vh]{% elif minHeight == "auto" %}min-h-[400px]{% else %}min-h-[75vh]{% endif %} {% if verticalAlign == "top" %}justify-start pt-20{% elif verticalAlign == "bottom" %}justify-end pb-20{% else %}justify-center{% endif %}{% endif %}{% if class %} {{ class }}{% endif %}">
{% if hasImage %}<div class="absolute inset-0 z-0">{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}<div{% if overlayColor == "light" %} style="background: hsl(var(--background) / 0.82);"{% endif %} class="absolute inset-0 {% if overlayColor == "light" %}{% elif overlayColor == "primary" %}bg-primary/50{% elif overlayOpacity <= 30 %}bg-black/30{% elif overlayOpacity <= 50 %}bg-black/50{% elif overlayOpacity <= 70 %}bg-black/70{% else %}bg-black/80{% endif %}"></div>{% endif %}</div>{% endif %}
{% if hasImage %}<div class="absolute inset-0 z-0">{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}<div{% if overlayColor == "light" %} style="background: radial-gradient(ellipse at {% if variant == "left-aligned" %}35%{% else %}50%{% endif %} 50%, hsl(var(--background) / 0.86) 0%, hsl(var(--background) / 0.8) 50%, hsl(var(--background) / 0.2) 100%);"{% endif %} class="absolute inset-0 {% if overlayColor == "light" %}{% elif overlayColor == "primary" %}bg-primary/50{% elif overlayOpacity <= 30 %}bg-black/30{% elif overlayOpacity <= 50 %}bg-black/50{% elif overlayOpacity <= 70 %}bg-black/70{% else %}bg-black/80{% endif %}"></div>{% endif %}</div>{% endif %}
<div class="relative z-10 mx-auto w-full max-w-4xl px-4 sm:px-6 lg:px-8 {% if variant == "left-aligned" %}text-left{% else %}text-center{% endif %}"><div class="editorial-panel px-6 py-10 sm:px-10 sm:py-14">{{ herocontent(align) }}</div></div>
</section>
{% endif %}

View File

@ -2,7 +2,7 @@
<div class="mx-auto grid max-w-6xl items-center gap-10 px-4 {% if media %}md:grid-cols-2{% endif %} md:gap-16">
<div class="{% if mediaPosition == "left" %}md:order-2{% else %}md:order-1{% endif %} {% if not media %}max-w-3xl{% endif %}">
{% if eyebrow %}<div class="mb-3 flex items-center gap-4"><span class="editorial-rule w-12"></span><p class="editorial-caps text-xs text-muted-foreground">{{ eyebrow }}</p></div>{% endif %}
{% if heading %}<h2 class="editorial-caps editorial-underline mt-2 text-3xl text-foreground md:text-4xl" style="font-family:var(--font-heading, 'Playfair Display', Georgia, serif)">{{ heading }}</h2>{% endif %}
{% if heading %}<h2 class="editorial-underline mt-2 text-3xl tracking-tight text-foreground md:text-4xl" style="font-family:var(--font-heading, 'Playfair Display', Georgia, serif)">{{ heading }}</h2>{% endif %}
{% if body %}<div class="mt-4 space-y-4 text-lg text-muted-foreground [&_a]:text-[hsl(var(--accent))] [&_a]:underline [&_strong]:text-foreground" style="font-family:var(--font-body, 'Source Serif 4', 'Source Serif Pro', Georgia, serif)">{{ body|safe }}</div>{% endif %}
{% if ctaUrl and ctaLabel %}<a href="{{ ctaUrl }}" class="editorial-button mt-6 inline-flex items-center gap-2">{{ ctaLabel }}<svg class="ml-2 inline h-4 w-4 align-middle" width="16" height="16" aria-hidden="true"><use href="/icons/lucide.svg#arrow-right"></use></svg></a>{% endif %}
</div>

View File

@ -1,6 +1,6 @@
<section data-block-override="editorial:team" class="py-16 md:py-24 bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div class="mx-auto max-w-6xl px-4">
{% if heading %}<h2 class="editorial-caps text-center text-3xl text-foreground md:text-4xl" style="font-family:var(--font-heading, 'Playfair Display', Georgia, serif)">{{ heading }}</h2>{% endif %}
{% if heading %}<h2 class="text-center text-3xl tracking-tight text-foreground md:text-4xl" style="font-family:var(--font-heading, 'Playfair Display', Georgia, serif)">{{ heading }}</h2>{% endif %}
{% if intro %}<p class="mx-auto mt-4 max-w-2xl text-center text-lg text-muted-foreground" style="font-family:var(--font-body, 'Source Serif 4', 'Source Serif Pro', Georgia, serif)">{{ intro }}</p>{% endif %}
<div class="mt-12 {% if layout == "list" %}mx-auto max-w-3xl space-y-6{% elif layout == "single" %}mx-auto max-w-xl{% else %}grid grid-cols-1 gap-8 sm:grid-cols-2 {% if columns == 2 %}lg:grid-cols-2{% elif columns == 4 %}lg:grid-cols-4{% else %}lg:grid-cols-3{% endif %}{% endif %}">
{% for member in members %}