package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // FooterBlockMeta defines metadata for the Coffee footer block. var FooterBlockMeta = blocks.BlockMeta{ Key: "footer", Title: "Footer", Description: "Torn-edge footer with optional location summary and newsletter caption", Source: "coffee", } // FooterBlock renders the coffee footer. // Content shape: {"showLocation": "true", "newsletterText": "..."} func FooterBlock(ctx context.Context, content map[string]any) string { data := FooterData{ ShowLocation: getBool(content, "showLocation", true), NewsletterText: getString(content, "newsletterText"), } var buf bytes.Buffer _ = footerComponent(data).Render(ctx, &buf) return buf.String() } // FooterData holds the data for the footer component. type FooterData struct { ShowLocation bool NewsletterText string }