Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/earthen. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
19 lines
480 B
Go
19 lines
480 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
)
|
|
|
|
// EarthenTextBlock renders text with Earthen styling.
|
|
// When variant is "lede", the first paragraph gains a botanical drop-cap.
|
|
func EarthenTextBlock(ctx context.Context, content map[string]any) string {
|
|
text := getString(content, "text")
|
|
class := getString(content, "class")
|
|
variant := getString(content, "variant")
|
|
|
|
var buf bytes.Buffer
|
|
_ = earthenTextComponent(text, class, variant).Render(ctx, &buf)
|
|
return buf.String()
|
|
}
|