Bootstrapped during the 2026-06-06 BlockNinja consolidation. Was previously an unversioned directory inside ~/src/blockninja-themes/art-deco. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
27 lines
708 B
Go
27 lines
708 B
Go
package main
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
)
|
|
|
|
// ArtDecoTextBlock overrides the built-in "text" block when the Art Deco theme is active.
|
|
// Renders prose in Cormorant body with a classical italic drop-cap on the first paragraph.
|
|
// Content: {"text": "<rich HTML>", "class": "optional-extra-class"}
|
|
func ArtDecoTextBlock(ctx context.Context, content map[string]any) string {
|
|
data := TextOverrideData{
|
|
Text: getString(content, "text"),
|
|
Class: getString(content, "class"),
|
|
}
|
|
|
|
var buf bytes.Buffer
|
|
_ = artDecoTextComponent(data).Render(ctx, &buf)
|
|
return buf.String()
|
|
}
|
|
|
|
// TextOverrideData is the typed view for the text override component.
|
|
type TextOverrideData struct {
|
|
Text string
|
|
Class string
|
|
}
|