Alex Dunmow 10cecadef6 fix(editorial): remediate hero dead-space, tiny titles, media balloon + mobile
Layout/whitespace:
- Hero: gate min-h-[75vh] + vertical-centering on hasImage so the text-only
  masthead no longer floats in ~800px of dead space; large display headline
  via CSS class (was collapsed to 0.72rem by editorial-caps clobbering text-6xl).
- Restore heading hierarchy: swap editorial-caps -> editorial-heading on every
  title/headline element (hero, card, newsletter, contact-form, cta, countdown,
  feature-grid, team, featured-posts, post-hero, menu-list, hours-location,
  author-bio-hero, password-reset-form). Masthead wordmarks (navbar/footer)
  keep editorial-caps by design.
- Home "river": constrain to a 48rem reading measure and add vertical rhythm
  (editorial-river/editorial-flow CSS) so stacked essay cards stop fusing into
  one seam-y block and body text no longer runs full-bleed wide.
- Newsletter: remove stray empty double-hairline artifact (single centered rule).
- Image: guard empty src so absent media no longer renders an empty muted box.

Mobile / JIT-safety:
- New width/spacing/hero-title behavior defined as theme CSS in manifest
  input_css_append (not JIT-scanned Tailwind), so it always compiles.
- Marginalia stack breakpoint widened 768px -> 1023px to match the article
  grid collapse, so the rail always gets its separator when stacked.

Build + check-safety green (32 checks: 19 ok 13 skip). No version bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 17:25:31 +08:00

24 lines
3.1 KiB
Plaintext

{# post-hero (editorial) — current post from the `post` provider. When the post #}
{# has a featured image it becomes an overlaid banner; otherwise a clean text hero. #}
{% set center = align != "left" %}
{% if post.featured_image_url %}
<section data-block-override="editorial:post-hero" class="hero relative flex min-h-[50vh] flex-col justify-end overflow-hidden bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div class="absolute inset-0 z-0">{% img post.featured_image_url alt=post.featured_image_alt class="h-full w-full object-cover" layout="hero" %}<div class="absolute inset-0 bg-black/70"></div></div>
<div class="relative z-10 mx-auto w-full max-w-4xl px-4 py-14 sm:px-6 lg:px-8 {% if center %}text-center{% endif %}">
{% if center %}<div class="mb-4 flex items-center justify-center gap-4"><span class="editorial-rule w-12"></span><span class="editorial-rule w-12"></span></div>{% endif %}
<h1 class="editorial-heading text-3xl leading-tight text-white sm:text-4xl lg:text-5xl" style="font-family:var(--font-heading, &quot;Playfair Display&quot;, Georgia, serif)">{{ post.title }}</h1>
{% if showExcerpt and post.excerpt %}<p class="mt-5 max-w-2xl text-lg text-white/80{% if center %} mx-auto{% endif %}" style="font-family:var(--font-body, &quot;Source Serif 4&quot;, &quot;Source Serif Pro&quot;, Georgia, serif)">{{ post.excerpt }}</p>{% endif %}
{% if showMeta %}<div class="mt-6 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-white/80{% if center %} justify-center{% endif %}">{% if post.author_name %}<span class="editorial-caps text-white">{{ post.author_name }}</span>{% endif %}{% if post.published_at %}<span>{{ post.published_at|date:"F j, Y" }}</span>{% endif %}{% if post.reading_time %}<span>{{ post.reading_time }} min read</span>{% endif %}</div>{% endif %}
</div>
</section>
{% else %}
<section data-block-override="editorial:post-hero" class="bg-background py-16 text-foreground md:py-20{% if class %} {{ class }}{% endif %}">
<div class="mx-auto w-full max-w-3xl px-4 {% if center %}text-center{% endif %}">
{% if center %}<div class="mb-4 flex items-center justify-center gap-4"><span class="editorial-rule w-12"></span><span class="editorial-rule w-12"></span></div>{% endif %}
<h1 class="editorial-caps editorial-underline text-3xl leading-tight sm:text-4xl lg:text-5xl text-foreground" style="font-family:var(--font-heading, &quot;Playfair Display&quot;, Georgia, serif)">{{ post.title }}</h1>
{% if showExcerpt and post.excerpt %}<p class="mt-5 text-lg text-muted-foreground{% if center %} mx-auto max-w-2xl{% endif %}" style="font-family:var(--font-body, &quot;Source Serif 4&quot;, &quot;Source Serif Pro&quot;, Georgia, serif)">{{ post.excerpt }}</p>{% endif %}
{% if showMeta %}<div class="mt-6 flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground{% if center %} justify-center{% endif %}">{% if post.author_name %}<span class="editorial-caps text-[hsl(var(--accent))]">{{ post.author_name }}</span>{% endif %}{% if post.published_at %}<span>{{ post.published_at|date:"F j, Y" }}</span>{% endif %}{% if post.reading_time %}<span>{{ post.reading_time }} min read</span>{% endif %}</div>{% endif %}
</div>
</section>
{% endif %}