themes-y2k/blocks/merch_card.ninjatpl
Alex Dunmow a86a54639a feat: convert to codeless .bnp — templates + manifest, Go/templ deleted (WO-WZ-021)
Convert the Y2K theme from a Go+templ wasm plugin to a fully codeless .bnp:
blocks/blocks.yaml + .ninjatpl, page/system templates, template overrides,
email wrapper, master pages and CSS declared in manifest.yaml. All *.go, *.templ,
*_templ.go, go.mod and go.sum deleted; schemas moved schemas/ -> blocks/.

Static parity proven 48/48 identical against the templ baseline (10 blocks x
full+empty+variant branches, 4 overrides incl. heading L1-6, email full+empty).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 15:10:52 +08:00

14 lines
1.0 KiB
Plaintext

<article class="relative y2k-bevel rounded-2xl overflow-hidden bg-card flex flex-col" data-block-key="y2k:merch_card">
{% if sticker %}<span class="absolute top-3 right-3 z-10 y2k-button text-xs uppercase tracking-widest">{% if sticker == "sold-out" %}sold out{% else %}{{ sticker }}{% endif %}</span>{% endif %}
<div class="aspect-square bg-muted overflow-hidden y2k-image-frame border-0 rounded-none">
{% if image %}<img src="{{ image }}" alt="{{ title }}" class="w-full h-full object-cover">{% else %}<div class="w-full h-full flex items-center justify-center text-muted-foreground text-xs uppercase tracking-widest">no image</div>{% endif %}
</div>
<div class="p-4 flex flex-col gap-2 flex-1">
<h3 class="y2k-heading text-foreground text-lg">{{ title|default:"untitled" }}</h3>
<div class="flex items-center justify-between gap-3 mt-auto">
<span class="text-foreground font-bold">{{ price|default:"$--" }}</span>
{% if buyHref %}<a href="{{ buyHref }}" class="y2k-button text-sm">buy</a>{% endif %}
</div>
</div>
</article>