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>
31 lines
774 B
Plaintext
31 lines
774 B
Plaintext
package main
|
|
|
|
// imageFrameClass returns the utility class for an image frame option.
|
|
func imageFrameClass(frame string) string {
|
|
switch frame {
|
|
case "scallop":
|
|
return "deco-scallop"
|
|
case "plain":
|
|
return ""
|
|
default:
|
|
return "deco-step"
|
|
}
|
|
}
|
|
|
|
// artDecoImageComponent renders an image wrapped in the stepped ziggurat frame option.
|
|
templ artDecoImageComponent(data ImageOverrideData) {
|
|
<figure data-block-override="art-deco:image" class="my-8">
|
|
<div class={ imageFrameClass(data.Frame) }>
|
|
<img src={ data.Src } alt={ data.Alt } class="block w-full h-auto"/>
|
|
</div>
|
|
if data.Caption != "" {
|
|
<figcaption
|
|
class="mt-2 italic text-center text-sm"
|
|
style="color: hsl(var(--muted-foreground));"
|
|
>
|
|
{ data.Caption }
|
|
</figcaption>
|
|
}
|
|
</figure>
|
|
}
|