Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/kindergarten. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
22 lines
588 B
Go
22 lines
588 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
)
|
|
|
|
// KindergartenCardBlock renders a soft cream card with a 4px primary-colored
|
|
// top stripe (spec §9).
|
|
//
|
|
// Content shape: {"title": "...", "body": "...", "class": "..."}. The body
|
|
// is rendered as raw HTML so it can host inline formatting.
|
|
func KindergartenCardBlock(ctx context.Context, content map[string]any) string {
|
|
title := getString(content, "title")
|
|
body := getString(content, "body")
|
|
class := getString(content, "class")
|
|
|
|
var buf bytes.Buffer
|
|
_ = kgCardComponent(title, body, class).Render(ctx, &buf)
|
|
return buf.String()
|
|
}
|