fix: release accessible post hero
This commit is contained in:
parent
2477741817
commit
7b9d652189
@ -2,8 +2,11 @@
|
||||
name = "terminal"
|
||||
display_name = "Terminal"
|
||||
scope = "@themes"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
description = "Phosphor-on-black TTY theme for dev tools and OSS docs. Window chrome, man-page article layouts, keybind tables, boot logs, monospace type, and a typed-terminal canvas hero. Paper-teletype light mode, phosphor dark mode."
|
||||
kind = "theme"
|
||||
categories = ["templates"]
|
||||
tags = ["terminal", "hacker", "monospace", "dev", "ctf", "docs", "devtools", "oss"]
|
||||
|
||||
[compatibility]
|
||||
plugin_sdk = ">=0.3.7"
|
||||
|
||||
@ -1,18 +1,19 @@
|
||||
{# post-hero (terminal override) — current post from the `post` provider. When the post #}
|
||||
{# has a featured image it becomes an overlaid banner; otherwise a clean text hero. #}
|
||||
{# Terminal post hero — CRT copy panel and media are physically separate. #}
|
||||
{% set center = align != "left" %}
|
||||
{% 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 %}">
|
||||
<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 class="tty-scanlines pointer-events-none absolute inset-0 z-[1]"></div>
|
||||
<div class="relative z-10 mx-auto w-full max-w-4xl px-4 py-12 sm:px-6 lg:px-8 {% if center %}text-center{% endif %}">
|
||||
<h1 class="terminal-heading text-3xl font-bold leading-tight text-white sm:text-4xl lg:text-5xl" data-text="{{ post.title }}">{{ post.title }}</h1>
|
||||
{% if showExcerpt and post.excerpt %}<p class="terminal-page mt-4 max-w-2xl text-lg text-white/80{% if center %} mx-auto{% endif %}">{{ post.excerpt }}</p>{% endif %}
|
||||
{% if showMeta %}<div class="mt-6 flex flex-wrap items-center gap-x-3 gap-y-1 terminal-mono text-sm uppercase tracking-wide text-white/80{% if center %} justify-center{% endif %}">{% if post.author_name %}<span class="font-medium 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 %}
|
||||
<section data-block-override="terminal: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="relative mx-auto grid w-full max-w-6xl overflow-hidden rounded-none border border-primary bg-card text-card-foreground shadow-sm lg:grid-cols-5">
|
||||
<div class="tty-scanlines pointer-events-none absolute inset-0"></div>
|
||||
<div data-slot="content" class="relative flex flex-col justify-center p-6 sm:p-8 lg:col-span-3 lg:p-12{% if center %} text-center{% endif %}">
|
||||
<h1 class="terminal-heading text-3xl font-bold leading-tight text-foreground sm:text-4xl lg:text-5xl" data-text="{{ post.title }}">{{ post.title }}</h1>
|
||||
{% if showExcerpt and post.excerpt %}<p class="terminal-page 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="terminal-mono mt-6 flex flex-wrap items-center gap-x-4 gap-y-2 text-sm uppercase tracking-wide text-accent{% if center %} justify-center{% endif %}">{% if post.author_name %}<span class="font-medium 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="relative 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 class="relative overflow-hidden bg-background py-14 text-foreground md:py-20{% if class %} {{ class }}{% endif %}">
|
||||
<section data-block-override="terminal:post-hero" class="post-hero relative overflow-hidden bg-background py-14 text-foreground md:py-20{% if class %} {{ class }}{% endif %}">
|
||||
<div class="tty-scanlines pointer-events-none absolute inset-0"></div>
|
||||
<div class="relative z-10 mx-auto w-full max-w-3xl px-4 {% if center %}text-center{% endif %}">
|
||||
<h1 class="terminal-heading text-3xl font-bold leading-tight tracking-tight sm:text-4xl lg:text-5xl" data-text="{{ post.title }}">{{ post.title }}</h1>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user