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
563 B
Go
19 lines
563 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
)
|
|
|
|
// CyberpunkHeadingBlock renders the built-in heading block with cyberpunk styling.
|
|
// H1/H2 get the glitch text-shadow (magenta + cyan offsets); smaller levels get
|
|
// mono small-caps eyebrow class.
|
|
func CyberpunkHeadingBlock(ctx context.Context, content map[string]any) string {
|
|
text := getString(content, "text")
|
|
textClass := getString(content, "textClass")
|
|
level := parseHeadingLevel(content)
|
|
var buf bytes.Buffer
|
|
_ = cyberpunkHeadingComponent(level, text, textClass).Render(ctx, &buf)
|
|
return buf.String()
|
|
}
|