Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/brutalist. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
20 lines
579 B
Plaintext
20 lines
579 B
Plaintext
package main
|
|
|
|
templ captionImageComponent(data CaptionImageData) {
|
|
<figure class="brutalist-figure" data-block="brutalist:caption_image" style="margin: 2rem 0;">
|
|
if data.ImageURL != "" {
|
|
<img src={ data.ImageURL } alt={ data.Caption } style="display: block; width: 100%; height: auto;"/>
|
|
}
|
|
if data.Caption != "" || data.FigureNumber != "" {
|
|
<figcaption>
|
|
if data.FigureNumber != "" {
|
|
<span style="margin-right: 0.5rem;">{ data.FigureNumber }</span>
|
|
}
|
|
if data.Caption != "" {
|
|
<span>{ data.Caption }</span>
|
|
}
|
|
</figcaption>
|
|
}
|
|
</figure>
|
|
}
|