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

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

22 lines
521 B
Plaintext

package main
// buttonOverrideComponent renders a Corporate Modernist styled button.
templ buttonOverrideComponent(label, href, variant string) {
if variant == "outline" || variant == "secondary" {
<a class="cm-btn-outline" href={ templ.SafeURL(href) }>
{ buttonOverrideLabel(label) }
</a>
} else {
<a class="cm-btn-primary" href={ templ.SafeURL(href) }>
{ buttonOverrideLabel(label) }
</a>
}
}
func buttonOverrideLabel(label string) string {
if label != "" {
return label
}
return "Learn more"
}