Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/terminal. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
21 lines
468 B
Plaintext
21 lines
468 B
Plaintext
package main
|
|
|
|
func buttonHref(url string) string {
|
|
if url == "" {
|
|
return "#"
|
|
}
|
|
return url
|
|
}
|
|
|
|
templ terminalButtonComponent(text, url, target string) {
|
|
if target == "_blank" {
|
|
<a class="terminal-button caret-blink" href={ templ.SafeURL(buttonHref(url)) } target="_blank" rel="noopener noreferrer">
|
|
{ "[ " + text + " ]" }
|
|
</a>
|
|
} else {
|
|
<a class="terminal-button caret-blink" href={ templ.SafeURL(buttonHref(url)) }>
|
|
{ "[ " + text + " ]" }
|
|
</a>
|
|
}
|
|
}
|