Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/y2k. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
19 lines
587 B
Plaintext
19 lines
587 B
Plaintext
package main
|
|
|
|
// webringBadgeComponent renders the prev/ring/next badge triplet at the
|
|
// canonical 88x31 button size.
|
|
templ webringBadgeComponent(data WebringBadgeData) {
|
|
<nav class="flex items-center gap-2 my-4" data-block-key="y2k:webring_badge" aria-label="webring">
|
|
<a href={ templ.SafeURL(orHash(data.PrevHref)) } class="y2k-webring-badge">prev</a>
|
|
<span class="y2k-webring-badge">{ data.RingName }</span>
|
|
<a href={ templ.SafeURL(orHash(data.NextHref)) } class="y2k-webring-badge">next</a>
|
|
</nav>
|
|
}
|
|
|
|
func orHash(s string) string {
|
|
if s == "" {
|
|
return "#"
|
|
}
|
|
return s
|
|
}
|