Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/editorial. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
24 lines
697 B
Plaintext
24 lines
697 B
Plaintext
package main
|
|
|
|
// marginaliaComponent renders the marginalia rail. When there are zero notes
|
|
// the block renders an empty container so the master-page slot still has a
|
|
// stable hook point in the DOM (the UAT looks for the data-block attribute).
|
|
templ marginaliaComponent(data MarginaliaData) {
|
|
<div class="editorial-marginalia" data-block="editorial:marginalia">
|
|
if len(data.Notes) > 0 {
|
|
for _, note := range data.Notes {
|
|
<aside>
|
|
if note.Anchor != "" {
|
|
<span class="editorial-byline-meta">{ note.Anchor }</span>
|
|
}
|
|
if note.Note != "" {
|
|
@templ.Raw(note.Note)
|
|
}
|
|
</aside>
|
|
}
|
|
} else {
|
|
<aside class="text-xs opacity-60">{ "" }</aside>
|
|
}
|
|
</div>
|
|
}
|