fix: website factory render pass polish (0.5.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 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-11-20 06:39:12 +08:00
parent e6b4e64bbc
commit 5ca790ea74
4 changed files with 33 additions and 12 deletions

View File

@ -0,0 +1,21 @@
# The hero scrim lets the photo show, and the footer logo sits on a plate
Decided 2026-11-20 for art-deco 0.5.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).
- An image logo in the footer sits on a plate of the theme background. The footer is the foreground colour, and a logo drawn for a light page vanished on it.
- 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: champagne-noir dark destructive; emerald-gilt dark destructive; ivory-rose dark destructive; ivory-rose light primary; velvet-onyx dark accent; velvet-onyx dark destructive; velvet-onyx light accent. 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.
- The footer social links set their light colour inline as well as by class. The icon still renders black on the dark footer in the WO-096 render, so its colour comes from the icon itself, outside this template; that stays open.
## Consequences
- art-deco 0.5.8 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it.
- No schema field changes.
Keywords: social icons, presets, AA, button contrast, primaryForeground, accentForeground, art-deco, hero, overlayColor, scrim, radial-gradient, contrast, footer, logo, logo plate, WO-096, website factory, render pass

View File

@ -47,7 +47,7 @@
"mutedForeground": "40 12% 62%",
"accent": "36 80% 62%",
"accentForeground": "40 30% 8%",
"destructive": "0 72% 52%",
"destructive": "0 72% 50%",
"destructiveForeground": "40 25% 96%",
"border": "42 30% 22%",
"input": "42 20% 18%",
@ -75,7 +75,7 @@
"popover": "36 35% 99%",
"popoverForeground": "20 15% 14%",
"primary": "18 55% 58%",
"primaryForeground": "36 40% 97%",
"primaryForeground": "0 0% 9%",
"secondary": "30 35% 92%",
"secondaryForeground": "20 15% 14%",
"muted": "30 25% 94%",
@ -103,7 +103,7 @@
"mutedForeground": "25 15% 62%",
"accent": "15 62% 62%",
"accentForeground": "20 20% 8%",
"destructive": "0 72% 52%",
"destructive": "0 72% 48%",
"destructiveForeground": "30 30% 94%",
"border": "20 20% 24%",
"input": "20 18% 20%",
@ -136,7 +136,7 @@
"secondaryForeground": "260 20% 12%",
"muted": "280 12% 93%",
"mutedForeground": "260 12% 40%",
"accent": "320 35% 52%",
"accent": "320 35% 48%",
"accentForeground": "280 20% 96%",
"destructive": "0 70% 45%",
"destructiveForeground": "280 15% 96%",
@ -157,9 +157,9 @@
"secondaryForeground": "42 30% 88%",
"muted": "260 15% 12%",
"mutedForeground": "42 15% 60%",
"accent": "320 35% 55%",
"accent": "320 35% 49%",
"accentForeground": "42 40% 95%",
"destructive": "0 72% 52%",
"destructive": "0 72% 49%",
"destructiveForeground": "42 40% 95%",
"border": "260 20% 22%",
"input": "260 18% 18%",
@ -215,7 +215,7 @@
"mutedForeground": "45 15% 62%",
"accent": "158 45% 45%",
"accentForeground": "162 25% 6%",
"destructive": "0 72% 52%",
"destructive": "0 72% 49%",
"destructiveForeground": "45 35% 95%",
"border": "162 20% 20%",
"input": "162 18% 16%",

View File

@ -2,20 +2,20 @@
{% set fl = layout %}
{% if not fl %}{% if template == "centered" %}{% set fl = "centered" %}{% else %}{% set fl = "columns" %}{% endif %}{% endif %}
{% set fbg = backgroundColor|default:"bg-foreground text-background" %}
{% macro sociallinks(cls) %}{% if social_items %}<div class="flex items-center gap-4 {{ cls }}">{% for s in social_items %}<a href="{{ s.url }}" target="_blank" rel="noopener" title="{{ s.label }}" class="text-background/70 hover:text-primary transition-colors"><span class="sr-only">{{ s.label }}</span>{% if s.icon %}::{{ s.icon }}::{% else %}{{ s.label }}{% endif %}</a>{% endfor %}</div>{% endif %}{% endmacro %}
{% macro sociallinks(cls) %}{% if social_items %}<div class="flex items-center gap-4 {{ cls }}">{% for s in social_items %}<a href="{{ s.url }}" target="_blank" rel="noopener" title="{{ s.label }}" class="text-background/70 hover:text-primary transition-colors" style="color:hsl(var(--background) / 0.7);"><span class="sr-only">{{ s.label }}</span>{% if s.icon %}::{{ s.icon }}::{% else %}{{ s.label }}{% endif %}</a>{% endfor %}</div>{% endif %}{% endmacro %}
{% macro newsletter() %}{% if showNewsletter %}<div class="max-w-sm"><h3 class="deco-caps text-sm text-primary">{{ newsletterTitle|default:"Join the guest list" }}</h3>{% if newsletterDescription %}<p class="mt-1 text-sm italic text-background/70">{{ newsletterDescription }}</p>{% endif %}<div class="mt-3">{% signup_form list=newsletterListSlug|default:"main" source="footer" submit=newsletterButtonText|default:"Subscribe" %}</div></div>{% endif %}{% endmacro %}
{% macro legalbar() %}<div class="mt-10 pt-6 border-t border-[hsl(var(--primary)/0.4)] flex flex-col sm:flex-row items-center justify-between gap-3 text-sm text-background/60"><p>{% if copyright %}&copy; {{ copyright }}{% else %}&copy; {{ companyName }}{% endif %}</p>{% if legal_items %}<nav class="flex flex-wrap items-center gap-x-4 gap-y-1">{% for l in legal_items %}<a href="{{ l.url|default:'#' }}"{% if l.open_in_new_tab %} target="_blank" rel="noopener"{% endif %} class="hover:text-primary transition-colors">{{ l.label }}</a>{% endfor %}</nav>{% endif %}</div>{% endmacro %}
<footer data-block-override="art-deco:footer" class="w-full border-t-2 border-[hsl(var(--primary))] {{ fbg }} {{ class }}">
<div class="{% if fullWidth %}w-full px-4 sm:px-6 lg:px-8{% else %}max-w-7xl mx-auto px-4 sm:px-6 lg:px-8{% endif %} py-16">
{% if fl == "minimal" %}
<div class="flex flex-col sm:flex-row items-center justify-between gap-6">
<div class="flex items-center gap-3">{% if logo %}<img src="{{ logo }}" alt="{{ companyName }}" class="h-8 w-auto"/>{% elif companyName %}<span class="deco-caps text-lg" style="font-family:var(--font-heading, 'Cinzel', Georgia, serif);">{{ companyName }}</span>{% endif %}{% if tagline %}<span class="text-sm italic text-background/70 hidden sm:inline">{{ tagline }}</span>{% endif %}</div>
<div class="flex items-center gap-3">{% if logo %}<span class="inline-flex rounded-none p-2" style="background-color:hsl(var(--background));"><img src="{{ logo }}" alt="{{ companyName }}" class="h-8 w-auto"/></span>{% elif companyName %}<span class="deco-caps text-lg" style="font-family:var(--font-heading, 'Cinzel', Georgia, serif);">{{ companyName }}</span>{% endif %}{% if tagline %}<span class="text-sm italic text-background/70 hidden sm:inline">{{ tagline }}</span>{% endif %}</div>
{{ sociallinks("") }}
</div>
{{ legalbar() }}
{% elif fl == "centered" %}
<div class="flex flex-col items-center text-center gap-5">
{% if logo %}<img src="{{ logo }}" alt="{{ companyName }}" class="h-10 w-auto"/>{% elif companyName %}<span class="deco-caps text-2xl text-primary" style="font-family:var(--font-heading, 'Cinzel', 'Italiana', Georgia, serif);">{{ companyName }}</span>{% endif %}
{% if logo %}<span class="inline-flex rounded-none p-2" style="background-color:hsl(var(--background));"><img src="{{ logo }}" alt="{{ companyName }}" class="h-10 w-auto"/></span>{% elif companyName %}<span class="deco-caps text-2xl text-primary" style="font-family:var(--font-heading, 'Cinzel', 'Italiana', Georgia, serif);">{{ companyName }}</span>{% endif %}
<div class="h-6 w-40 deco-sunburst" aria-hidden="true"></div>
{% if tagline %}<p class="max-w-md text-sm italic text-background/70">{{ tagline }}</p>{% endif %}
{% if columns %}<nav class="flex flex-wrap items-center justify-center gap-x-6 gap-y-2">{% for col in columns %}{% for item in col.items %}<a href="{{ item.url|default:'#' }}"{% if item.open_in_new_tab %} target="_blank" rel="noopener"{% endif %} class="deco-caps text-xs text-background/80 hover:text-primary transition-colors">{{ item.label }}</a>{% endfor %}{% endfor %}</nav>{% endif %}
@ -26,7 +26,7 @@
{% else %}
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8">
<div class="col-span-2 lg:col-span-2">
{% if logo %}<img src="{{ logo }}" alt="{{ companyName }}" class="h-9 w-auto"/>{% elif companyName %}<span class="deco-caps text-xl text-primary" style="font-family:var(--font-heading, 'Cinzel', 'Italiana', Georgia, serif);">{{ companyName }}</span>{% endif %}
{% if logo %}<span class="inline-flex rounded-none p-2" style="background-color:hsl(var(--background));"><img src="{{ logo }}" alt="{{ companyName }}" class="h-9 w-auto"/></span>{% elif companyName %}<span class="deco-caps text-xl text-primary" style="font-family:var(--font-heading, 'Cinzel', 'Italiana', Georgia, serif);">{{ companyName }}</span>{% endif %}
{% if tagline %}<p class="mt-3 max-w-xs text-sm italic text-background/70">{{ tagline }}</p>{% endif %}
{% if address or email or phone %}<address class="mt-4 not-italic text-sm text-background/70 space-y-1">{% if address %}<div>{{ address }}</div>{% endif %}{% if email %}<div><a href="mailto:{{ email }}" class="hover:text-primary transition-colors">{{ email }}</a></div>{% endif %}{% if phone %}<div><a href="tel:{{ phone }}" class="hover:text-primary transition-colors">{{ phone }}</a></div>{% endif %}</address>{% endif %}
{{ sociallinks("mt-5") }}

View File

@ -33,7 +33,7 @@
{% set align = "center" %}
{% if variant == "left-aligned" %}{% set align = "left" %}{% endif %}
<section data-block-override="art-deco:hero" class="hero relative flex flex-col overflow-hidden bg-background text-foreground deco-grain {% 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 %}{% else %}py-16 md:py-24{% endif %} {% if verticalAlign == "top" %}justify-start pt-20{% elif verticalAlign == "bottom" %}justify-end pb-20{% else %}justify-center{% 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="pointer-events-none absolute inset-x-0 top-0 z-[1] h-40 opacity-40 deco-sunburst" aria-hidden="true"></div>
<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="deco-frame bg-transparent px-6 py-10 sm:px-10 sm:py-14">{{ herocontent(align) }}</div></div>
</section>