themes-pastel-dream/card_override.go
Alex Dunmow de55bbebd6 initial: theme plugin pastel-dream
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/pastel-dream.

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

30 lines
722 B
Go

package main
import (
"bytes"
"context"
)
// PastelCardBlock renders cards with the soft 20px radius, blush-tinted
// shadow, and optional watercolor border. The body field accepts pre-rendered
// HTML so other blocks can be composed inside.
// Content shape: {title, body, footer}
func PastelCardBlock(ctx context.Context, content map[string]any) string {
data := PastelCardData{
Title: getString(content, "title"),
Body: getString(content, "body"),
Footer: getString(content, "footer"),
}
var buf bytes.Buffer
_ = pastelCardComponent(data).Render(ctx, &buf)
return buf.String()
}
// PastelCardData drives the card override.
type PastelCardData struct {
Title string
Body string
Footer string
}