package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // FeaturedPourBlockMeta defines metadata for the featured_pour block. var FeaturedPourBlockMeta = blocks.BlockMeta{ Key: "featured_pour", Title: "Featured Pour", Description: "Hero card for a featured coffee, tea or pastry with tasting notes and price", Source: "coffee", } // FeaturedPourBlock renders a featured pour card. // Content shape: {"name": "...", "tasting": "...rich text...", "image": "...", "price": "..."} func FeaturedPourBlock(ctx context.Context, content map[string]any) string { data := FeaturedPourData{ Name: getString(content, "name"), Tasting: getString(content, "tasting"), Image: getString(content, "image"), Price: getString(content, "price"), } var buf bytes.Buffer _ = featuredPourComponent(data).Render(ctx, &buf) return buf.String() } // FeaturedPourData holds the data for the component. type FeaturedPourData struct { Name string Tasting string Image string Price string }