22 lines
2.6 KiB
Plaintext
22 lines
2.6 KiB
Plaintext
{% set center = align != "left" %}
|
|
{% if post.featured_image_url %}
|
|
<section data-block-override="coffee: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 data-slot="layout" class="mx-auto grid w-full max-w-6xl overflow-hidden rounded-3xl border border-primary/30 bg-card text-card-foreground shadow-sm lg:grid-cols-5">
|
|
<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="coffee-display text-3xl leading-tight text-primary sm:text-4xl lg:text-5xl">{{ post.title }}</h1>
|
|
{% if showExcerpt and post.excerpt %}<p class="coffee-body mt-4 max-w-2xl text-lg leading-relaxed text-muted-foreground{% if center %} mx-auto{% endif %}">{{ post.excerpt }}</p>{% endif %}
|
|
{% if showMeta %}<div data-slot="meta" class="coffee-hand mt-6 flex flex-wrap items-center gap-x-4 gap-y-2 text-lg text-accent{% if center %} justify-center{% endif %}">{% if post.author_name %}<span>{{ post.author_name }}</span>{% endif %}{% if post.published_at %}<time class="text-muted-foreground" datetime="{{ post.published_at }}">{{ post.published_at|date:"F j, Y" }}</time>{% endif %}{% if post.reading_time %}<span class="text-muted-foreground">{{ post.reading_time }} min</span>{% endif %}</div>{% endif %}
|
|
</div>
|
|
<figure data-slot="media" class="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" layout="third" %}{% attribution post.featured_image_url class="px-4 py-2 text-xs text-muted-foreground" %}</figure>
|
|
</div>
|
|
</section>
|
|
{% else %}
|
|
<section data-block-override="coffee:post-hero" class="post-hero bg-background py-14 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 %}">
|
|
<h1 class="coffee-display text-3xl leading-tight text-primary sm:text-4xl lg:text-5xl">{{ post.title }}</h1>
|
|
{% if showExcerpt and post.excerpt %}<p class="coffee-body mt-4 text-lg text-muted-foreground{% if center %} mx-auto max-w-2xl{% endif %}">{{ post.excerpt }}</p>{% endif %}
|
|
{% if showMeta %}<div class="coffee-hand mt-6 flex flex-wrap items-center gap-x-3 gap-y-1 text-lg text-accent{% if center %} justify-center{% endif %}">{% if post.author_name %}<span>{{ post.author_name }}</span>{% endif %}{% if post.published_at %}<span class="text-muted-foreground">{{ post.published_at|date:"F j, Y" }}</span>{% endif %}{% if post.reading_time %}<span class="text-muted-foreground">{{ post.reading_time }} min</span>{% endif %}</div>{% endif %}
|
|
</div>
|
|
</section>
|
|
{% endif %}
|