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>
19 lines
599 B
Go
19 lines
599 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
)
|
|
|
|
// CyberpunkButtonBlock renders the built-in button with cyberpunk styling:
|
|
// terminal-cursor caret suffix, RGB-split hover via the .rgb-split class,
|
|
// mono label and uppercase tracking.
|
|
func CyberpunkButtonBlock(ctx context.Context, content map[string]any) string {
|
|
label := getStringWithDefault(content, "label", "Button")
|
|
href := safeHref(getString(content, "href"))
|
|
variant := getStringWithDefault(content, "variant", "primary")
|
|
var buf bytes.Buffer
|
|
_ = cyberpunkButtonComponent(label, href, variant).Render(ctx, &buf)
|
|
return buf.String()
|
|
}
|