themes-scifi-clean/button_override.go
Alex Dunmow 96b87b3e81 initial: theme plugin scifi-clean
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>
2026-06-06 14:11:43 +08:00

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()
}