package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // ImagePairBlockMeta defines the Noir diptych block. var ImagePairBlockMeta = blocks.BlockMeta{ Key: "image_pair", Title: "Image Pair", Description: "50/50 photograph diptych with a shared caption beneath both images.", Source: "noir", Category: blocks.CategoryContent, } // ImagePairBlock renders a two-photograph diptych. // Content shape: {"left":"...","right":"...","caption":"..."} func ImagePairBlock(ctx context.Context, content map[string]any) string { data := ImagePairData{ Left: blocks.ResolveMediaPath(getString(content, "left")), Right: blocks.ResolveMediaPath(getString(content, "right")), Caption: getString(content, "caption"), } var buf bytes.Buffer _ = imagePairComponent(data).Render(ctx, &buf) return buf.String() } // ImagePairData holds the parsed view-model for the diptych. type ImagePairData struct { Left string Right string Caption string }