themes-art-deco/press_quote.templ
Alex Dunmow 9fbedf5ba1 initial: theme plugin art-deco
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/art-deco.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 14:11:19 +08:00

40 lines
1.5 KiB
Plaintext

package main
// pressQuoteComponent renders the italic Cormorant pull-quote between fan dividers.
templ pressQuoteComponent(data PressQuoteData) {
<section data-block="art-deco:press_quote" class="py-16">
<div class="max-w-3xl mx-auto px-4 text-center">
<div class="h-6 mb-6 deco-sunburst" aria-hidden="true"></div>
<blockquote
class="italic text-2xl md:text-3xl leading-snug"
style="font-family: var(--font-body, &quot;Cormorant Garamond&quot;, &quot;Cormorant&quot;, Georgia, serif); font-style: italic; color: hsl(var(--foreground));"
>
if data.Quote != "" {
@templ.Raw(data.Quote)
} else {
<span style="color: hsl(var(--muted-foreground));">Add a press quote to populate this block.</span>
}
</blockquote>
if data.Stars > 0 {
<div class="mt-4 flex justify-center gap-1" aria-label="Star rating" data-stars={ starsAttr(data.Stars) }>
for i := 0; i < data.Stars; i++ {
<span data-deco-star="filled" aria-hidden="true" style="color: hsl(var(--primary));">★</span>
}
for i := data.Stars; i < 5; i++ {
<span data-deco-star="empty" aria-hidden="true" style="color: hsl(var(--muted-foreground));">☆</span>
}
</div>
}
if data.Source != "" {
<p
class="mt-6 deco-caps text-xs"
style="font-family: var(--font-heading, &quot;Italiana&quot;, &quot;Cinzel&quot;, Georgia, serif); color: hsl(var(--muted-foreground));"
>
{ data.Source }
</p>
}
<div class="h-6 mt-6 deco-scallop" aria-hidden="true"></div>
</div>
</section>
}