fix: release accessible post hero

This commit is contained in:
Alex Dunmow 2026-08-20 12:13:31 +08:00
parent 63dfff0f19
commit 42f9611382
2 changed files with 14 additions and 9 deletions

View File

@ -2,8 +2,11 @@
name = "brutalist" name = "brutalist"
display_name = "Brutalist" display_name = "Brutalist"
scope = "@themes" scope = "@themes"
version = "0.7.0" version = "0.7.1"
description = "Concrete, oversized type, hard 12-col grid theme for design studios, architecture firms and art galleries." description = "Concrete, oversized type, hard 12-col grid theme for design studios, architecture firms and art galleries."
kind = "theme" kind = "theme"
categories = ["templates"] categories = ["templates"]
tags = ["brutalist", "neo-brutalist", "studio", "agency", "bold", "mono", "editorial", "candy"] tags = ["brutalist", "neo-brutalist", "studio", "agency", "bold", "mono", "editorial", "candy"]
[compatibility]
plugin_sdk = ">=0.3.7"

View File

@ -1,16 +1,18 @@
{# brutalist post-hero override — current post from the `post` provider. Featured image = overlaid banner; otherwise clean text hero. Fields: align, post.*, showExcerpt, showMeta. #} {# Brutalist post hero — uncompromising split grid, with copy off the image. #}
{% set center = align != "left" %} {% set center = align != "left" %}
{% if post.featured_image_url %} {% if post.featured_image_url %}
<section class="hero relative flex min-h-[50vh] flex-col justify-end overflow-hidden bg-background text-foreground{% if class %} {{ class }}{% endif %}"> <section data-block-override="brutalist:post-hero" class="post-hero bg-background px-4 py-8 text-foreground sm:px-6 sm:py-10 lg:px-8{% 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/60"></div></div> <div data-slot="layout" class="mx-auto grid w-full max-w-6xl overflow-hidden rounded-none border-4 border-foreground bg-card text-card-foreground lg:grid-cols-5">
<div class="bru-wrap-mid relative z-10 w-full py-12 {% if center %}text-center{% endif %}"> <div data-slot="content" class="flex flex-col justify-center p-6 sm:p-8 lg:col-span-3 lg:p-12{% if center %} text-center{% endif %}">
<h1 class="bru-kicker text-3xl leading-tight text-white sm:text-4xl lg:text-5xl">{{ post.title }}</h1> <h1 class="bru-kicker text-3xl leading-tight text-foreground sm:text-4xl lg:text-5xl">{{ post.title }}</h1>
{% if showExcerpt and post.excerpt %}<p class="mt-4 max-w-2xl text-lg text-white/80{% if center %} mx-auto{% endif %}">{{ post.excerpt }}</p>{% endif %} {% if showExcerpt and post.excerpt %}<p class="mt-4 max-w-2xl text-lg leading-relaxed text-muted-foreground{% if center %} mx-auto{% endif %}">{{ post.excerpt }}</p>{% endif %}
{% if showMeta %}<div class="bru-meta mt-6 flex flex-wrap items-center gap-x-3 gap-y-1 text-white/80{% if center %} justify-center{% endif %}">{% if post.author_name %}<span class="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 %} {% if showMeta %}<div data-slot="meta" class="bru-meta mt-6 flex flex-wrap items-center gap-x-4 gap-y-2 text-muted-foreground{% if center %} justify-center{% endif %}">{% if post.author_name %}<span class="text-foreground">{{ post.author_name }}</span>{% endif %}{% if post.published_at %}<time datetime="{{ post.published_at }}">{{ post.published_at|date:"F j, Y" }}</time>{% endif %}{% if post.reading_time %}<span>{{ post.reading_time }} min read</span>{% endif %}</div>{% endif %}
</div>
<figure data-slot="media" class="min-h-64 overflow-hidden border-t-4 border-foreground bg-muted lg:col-span-2 lg:min-h-96 lg:border-l-4 lg:border-t-0">{% img post.featured_image_url alt=post.featured_image_alt class="h-full w-full object-cover" layout="third" %}{% attribution post.featured_image_url class="px-4 py-2 text-xs text-muted-foreground" %}</figure>
</div> </div>
</section> </section>
{% else %} {% else %}
<section class="bru-section bg-background text-foreground{% if class %} {{ class }}{% endif %}"> <section data-block-override="brutalist:post-hero" class="post-hero bru-section bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div class="bru-wrap-narrow w-full {% if center %}text-center{% endif %}"> <div class="bru-wrap-narrow w-full {% if center %}text-center{% endif %}">
<h1 class="bru-kicker text-3xl leading-tight sm:text-4xl lg:text-5xl">{{ post.title }}</h1> <h1 class="bru-kicker text-3xl leading-tight sm:text-4xl lg:text-5xl">{{ post.title }}</h1>
{% if showExcerpt and post.excerpt %}<p class="mt-4 text-lg text-muted-foreground{% if center %} mx-auto max-w-2xl{% endif %}">{{ post.excerpt }}</p>{% endif %} {% if showExcerpt and post.excerpt %}<p class="mt-4 text-lg text-muted-foreground{% if center %} mx-auto max-w-2xl{% endif %}">{{ post.excerpt }}</p>{% endif %}