themes-editorial/text_override.go
Alex Dunmow 1d9a4c8ce6 initial: theme plugin editorial
Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously
an unversioned directory inside ~/src/blockninja-themes/editorial.

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

21 lines
561 B
Go

package main
import (
"bytes"
"context"
)
// EditorialTextBlock overrides the built-in `text` block for the editorial
// template. Body copy is Source Serif 4 within a 64ch measure, with
// continuation-paragraph indents.
//
// Content shape: { "text", "class" } — same as the built-in text block.
func EditorialTextBlock(ctx context.Context, content map[string]any) string {
text := getString(content, "text")
class := getString(content, "class")
var buf bytes.Buffer
_ = editorialTextComponent(text, class).Render(ctx, &buf)
return buf.String()
}