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>
30 lines
722 B
Go
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
|
|
}
|