Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/scifi-clean. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
23 lines
638 B
Go
23 lines
638 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
)
|
|
|
|
// ScifiButtonBlock renders a button with the Sci-Fi Clean treatment:
|
|
// mono uppercase label, hairline outline variant, right-arrow chevron suffix.
|
|
// Built-in button content shape: {"text": "...", "url": "...", "variant": "primary|outline"}.
|
|
func ScifiButtonBlock(ctx context.Context, content map[string]any) string {
|
|
text := getString(content, "text")
|
|
url := getString(content, "url")
|
|
variant := getStringDefault(content, "variant", "primary")
|
|
if text == "" {
|
|
return ""
|
|
}
|
|
|
|
var buf bytes.Buffer
|
|
_ = scifiButtonComponent(text, url, variant).Render(ctx, &buf)
|
|
return buf.String()
|
|
}
|