package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // WebringBadgeBlockMeta declares the canonical 88x31 webring badge row. var WebringBadgeBlockMeta = blocks.BlockMeta{ Key: "webring_badge", Title: "Webring Badge", Description: "Canonical 88x31 webring button row with prev/next/ring links.", Source: "y2k", Category: blocks.CategoryNavigation, } // WebringBadgeBlock renders the badge row. // Content: {prevHref, nextHref, ringName} func WebringBadgeBlock(ctx context.Context, content map[string]any) string { data := WebringBadgeData{ PrevHref: getString(content, "prevHref"), NextHref: getString(content, "nextHref"), RingName: getStringOr(content, "ringName", "the y2k.fm ring"), } var buf bytes.Buffer _ = webringBadgeComponent(data).Render(ctx, &buf) return buf.String() } // WebringBadgeData is the typed shape for the templ component. type WebringBadgeData struct { PrevHref string NextHref string RingName string }