themes-y2k/glitter_divider.go
Alex Dunmow 49f9c90589 initial: theme plugin y2k
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/y2k.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 14:11:46 +08:00

27 lines
684 B
Go

package main
import (
"bytes"
"context"
"git.dev.alexdunmow.com/block/core/blocks"
)
// GlitterDividerBlockMeta declares the animated sparkle divider.
var GlitterDividerBlockMeta = blocks.BlockMeta{
Key: "glitter_divider",
Title: "Glitter Divider",
Description: "Animated sparkle horizontal rule.",
Source: "y2k",
Category: blocks.CategoryLayout,
}
// GlitterDividerBlock renders the divider.
// Content: {variant}
func GlitterDividerBlock(ctx context.Context, content map[string]any) string {
variant := getStringOr(content, "variant", "sparkle")
var buf bytes.Buffer
_ = glitterDividerComponent(variant).Render(ctx, &buf)
return buf.String()
}