fix: render whole sections for factory-compiled sites (0.7.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-11-20 02:51:54 +08:00
parent 42f9611382
commit 5878766bc0
4 changed files with 26 additions and 7 deletions

View File

@ -0,0 +1,19 @@
# Compiled sites render whole sections on brutalist
Decided 2026-11-20 for brutalist 0.7.2, from the website factory's visual review (orchestrator WO-094, ADR 0078).
## Context
The website factory compiles a customer's site onto this theme and renders every page at 1280 and 390 pixels wide. The review found template defects that show on a real site as an empty region, an unreadable hero or a page wider than a phone.
## Decision
- rich-section renders one column with the text at a readable width when the section has no image. It used to keep a two-column grid with an empty media cell, so a compiled site whose about or contact section was waiting for a photo showed half the section blank.
- The hero draws a scrim over its photo: the theme background at 75% for the "light" overlay, the primary colour for "primary", and black at 60% otherwise. It had none, so muted text over a busy photo failed contrast.
## Consequences
- brutalist 0.7.2 is published to the dev registry; the orchestrator's `internal/factory/themes.yaml` pins it.
- No schema field changes. A site that sets the old values renders as before wherever it has an image.
Keywords: brutalist, rich-section, media, mediaPosition, empty column, hero, overlayColor, scrim, contrast, navbar, backdrop-blur, bn-navbar-drawer, team columns, WO-094, website factory, render review

View File

@ -2,7 +2,7 @@
name = "brutalist"
display_name = "Brutalist"
scope = "@themes"
version = "0.7.1"
version = "0.7.2"
description = "Concrete, oversized type, hard 12-col grid theme for design studios, architecture firms and art galleries."
kind = "theme"
categories = ["templates"]

View File

@ -10,7 +10,7 @@
{% set variant = template|default:"centered" %}
{% set hasImage = backgroundImage %}
<section class="brutalist-hero relative overflow-hidden bg-background text-foreground{% if class %} {{ class }}{% endif %}" data-has-media="{% if hasImage %}true{% else %}false{% endif %}">
{% if hasImage %}<div class="absolute inset-0 z-0">{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}</div>{% endif %}
{% if hasImage %}<div class="absolute inset-0 z-0">{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}<div class="absolute inset-0 {% if overlayColor == "light" %}bg-background/75{% elif overlayColor == "primary" %}bg-primary/50{% else %}bg-black/60{% endif %}"></div></div>{% endif %}
<div class="bru-wrap relative z-10 {% if variant == "centered" %}text-center{% endif %}">
<div style="max-width:70rem;{% if variant == "centered" %}margin:0 auto{% endif %}">
{% if eyebrowText %}<span class="bru-tag mb-6">{{ eyebrowText }}</span>{% endif %}

View File

@ -1,14 +1,14 @@
{# brutalist rich-section override — split text/media with bordered media frame. Fields: background, mediaPosition, eyebrow, heading, body, ctaUrl, ctaLabel, media, mediaAlt. #}
<section class="bru-section {% if background == "muted" %}bg-muted text-foreground{% elif background == "card" %}bg-card text-card-foreground{% else %}bg-background text-foreground{% endif %}{% if class %} {{ class }}{% endif %}">
<div class="bru-wrap grid items-center gap-10 md:grid-cols-2 md:gap-16">
<div class="{% if mediaPosition == "left" %}md:order-2{% else %}md:order-1{% endif %}">
<div class="bru-wrap grid items-center gap-10 {% 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 %}<span class="bru-tag mb-4">{{ eyebrow }}</span>{% endif %}
{% if heading %}<h2 class="bru-kicker" style="font-size:clamp(1.75rem,4vw,3rem)">{{ heading }}</h2>{% endif %}
{% if body %}<div class="mt-4 space-y-4 text-lg text-muted-foreground [&_a]:text-accent [&_a]:underline [&_strong]:text-foreground">{{ body|safe }}</div>{% endif %}
{% if ctaUrl and ctaLabel %}<a href="{{ ctaUrl }}" class="bru-btn bru-btn-solid mt-6">{{ ctaLabel }} →</a>{% endif %}
</div>
<div class="{% if mediaPosition == "left" %}md:order-1{% else %}md:order-2{% endif %}">
{% if media %}<div class="bru-slab bru-shadow overflow-hidden">{% img media alt=mediaAlt class="w-full h-auto object-cover" %}</div>{% endif %}
</div>
{% if media %}<div class="{% if mediaPosition == "left" %}md:order-1{% else %}md:order-2{% endif %}">
<div class="bru-slab bru-shadow overflow-hidden">{% img media alt=mediaAlt class="w-full h-auto object-cover" %}</div>
</div>{% endif %}
</div>
</section>