package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // CaptionStripBlockMeta defines the Noir caption strip block. var CaptionStripBlockMeta = blocks.BlockMeta{ Key: "caption_strip", Title: "Caption Strip", Description: "Full-width 10px mono caption strip with a label on the left and supporting text on the right.", Source: "noir", Category: blocks.CategoryNavigation, } // CaptionStripBlock renders a thin caption strip. // Content shape: {"label":"INDEX","right":"© Studio"} func CaptionStripBlock(ctx context.Context, content map[string]any) string { data := CaptionStripData{ Label: getString(content, "label"), Right: getString(content, "right"), } var buf bytes.Buffer _ = captionStripComponent(data).Render(ctx, &buf) return buf.String() } // CaptionStripData holds the parsed view-model. type CaptionStripData struct { Label string Right string }