Compare commits

..

1 Commits

Author SHA1 Message Date
Alex Dunmow
cbbf30de4a release: prepare noir 0.4.1 2026-08-22 11:58:38 +08:00
2 changed files with 11 additions and 10 deletions

View File

@ -7,3 +7,6 @@ description = "Detective and true-crime dossier theme: case-file cards, typewrit
kind = "theme" kind = "theme"
categories = ["templates"] categories = ["templates"]
tags = ["noir", "detective", "true-crime", "dossier", "typewriter", "monochrome", "editorial", "dark"] tags = ["noir", "detective", "true-crime", "dossier", "typewriter", "monochrome", "editorial", "dark"]
[compatibility]
plugin_sdk = ">=0.3.7"

View File

@ -1,18 +1,16 @@
{# Noir post hero — stark type beside a grain-treated monochrome frame. #} {# noir override — post-hero; preserves post.* reads, {% img %}, showExcerpt/showMeta/align, featured-image + no-image branches. #}
{% set center = align != "left" %} {% set center = align != "left" %}
{% if post.featured_image_url %} {% if post.featured_image_url %}
<section data-block-override="noir: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 %}"> <section data-block-override="noir:post-hero" class="hero relative flex min-h-[50vh] flex-col justify-end overflow-hidden bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div data-slot="layout" class="mx-auto grid w-full max-w-6xl overflow-hidden rounded-none border border-foreground/30 bg-card text-card-foreground shadow-sm lg:grid-cols-5"> <div class="absolute inset-0 z-0">{% img post.featured_image_url alt=post.featured_image_alt class="h-full w-full object-cover grayscale" layout="hero" %}<div class="absolute inset-0 bg-black/70"></div><div class="noir-grain absolute inset-0"></div></div>
<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 %}"> <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 %}">
<h1 class="noir-heading text-3xl leading-tight text-foreground sm:text-4xl lg:text-5xl">{{ post.title }}</h1> <h1 class="noir-heading text-3xl leading-tight text-white sm:text-4xl lg:text-5xl">{{ post.title }}</h1>
{% if showExcerpt and post.excerpt %}<p class="noir-body mt-5 max-w-2xl text-lg leading-relaxed text-muted-foreground{% if center %} mx-auto{% endif %}">{{ post.excerpt }}</p>{% endif %} {% if showExcerpt and post.excerpt %}<p class="noir-body mt-5 max-w-2xl text-lg text-white/80{% if center %} mx-auto{% endif %}">{{ post.excerpt }}</p>{% endif %}
{% if showMeta %}<div data-slot="meta" class="noir-label 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-primary">{{ 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 %} {% if showMeta %}<div class="noir-label 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 %}
</div>
<figure data-slot="media" class="noir-grain min-h-64 overflow-hidden bg-muted lg:col-span-2 lg:min-h-96">{% img post.featured_image_url alt=post.featured_image_alt class="h-full w-full object-cover grayscale" 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 data-block-override="noir:post-hero" class="post-hero bg-background py-16 text-foreground md:py-20{% if class %} {{ class }}{% endif %}"> <section data-block-override="noir: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 %}"> <div class="mx-auto w-full max-w-3xl px-4 {% if center %}text-center{% endif %}">
<h1 class="noir-heading text-3xl leading-tight sm:text-4xl lg:text-5xl" style="color:hsl(var(--foreground));">{{ post.title }}</h1> <h1 class="noir-heading text-3xl leading-tight sm:text-4xl lg:text-5xl" style="color:hsl(var(--foreground));">{{ post.title }}</h1>
{% if showExcerpt and post.excerpt %}<p class="noir-body mt-5 text-lg text-muted-foreground{% if center %} mx-auto max-w-2xl{% endif %}">{{ post.excerpt }}</p>{% endif %} {% if showExcerpt and post.excerpt %}<p class="noir-body mt-5 text-lg text-muted-foreground{% if center %} mx-auto max-w-2xl{% endif %}">{{ post.excerpt }}</p>{% endif %}