themes-cyberpunk/button_override.templ
Alex Dunmow 313ebaf296 initial: theme plugin cyberpunk
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/cyberpunk.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 14:11:25 +08:00

37 lines
1.4 KiB
Plaintext

package main
// cyberpunkButtonComponent renders the override for the built-in button block.
// Primary buttons get .rgb-split for the chromatic-aberration hover.
// Secondary / ghost variants use the accent/border tokens.
templ cyberpunkButtonComponent(label, href, variant string) {
switch variant {
case "secondary":
<a
href={ templ.SafeURL(href) }
class="cyberpunk-btn cyberpunk-mono inline-flex items-center gap-2 px-5 py-2.5 rounded-md font-semibold uppercase tracking-wider"
style="background-color: hsl(var(--secondary)); color: hsl(var(--secondary-foreground));"
>
<span>{ label }</span>
<span aria-hidden="true" class="caret-blink">_</span>
</a>
case "ghost":
<a
href={ templ.SafeURL(href) }
class="cyberpunk-btn-ghost cyberpunk-mono inline-flex items-center gap-2 px-5 py-2.5 rounded-md font-semibold uppercase tracking-wider"
style="border: 1px solid hsl(var(--accent)); color: hsl(var(--accent));"
>
<span>{ label }</span>
<span aria-hidden="true" class="caret-blink">_</span>
</a>
default:
<a
href={ templ.SafeURL(href) }
class="cyberpunk-btn rgb-split cyberpunk-mono inline-flex items-center gap-2 px-5 py-2.5 rounded-md font-semibold uppercase tracking-wider"
style="background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground));"
>
<span>{ label }</span>
<span aria-hidden="true" class="caret-blink">_</span>
</a>
}
}