themes-y2k/glitter_divider.templ
Alex Dunmow 49f9c90589 initial: theme plugin y2k
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>
2026-06-06 14:11:46 +08:00

26 lines
836 B
Plaintext

package main
// glitterDividerComponent renders a sparkle hr. The glyph used per variant is
// inert (decorative) — the divider itself carries role="separator".
templ glitterDividerComponent(variant string) {
<hr class="border-0 my-6" role="separator" data-block-key="y2k:glitter_divider" data-variant={ variant }/>
<div class="flex items-center justify-center gap-2 -mt-4 mb-4 text-accent" aria-hidden="true">
<span class="y2k-sparkle">{ glitterGlyph(variant) }</span>
<span class="y2k-sparkle" style="animation-delay: 200ms">{ glitterGlyph(variant) }</span>
<span class="y2k-sparkle" style="animation-delay: 400ms">{ glitterGlyph(variant) }</span>
</div>
}
func glitterGlyph(v string) string {
switch v {
case "stars":
return "*"
case "hearts":
return "<3"
case "chrome":
return "~"
default:
return "*"
}
}