package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // CozyFooterMeta defines the footer block. var CozyFooterMeta = blocks.BlockMeta{ Key: "cozy-footer", Title: "Cozy Footer", Description: "Newsletter signup, closing affirmation, menu column, and social pills.", Source: "pastel-dream", Category: blocks.CategoryNavigation, } // CozyFooterBlock renders the footer. // Content shape: {showSignup, affirmation, menuName, social[]} func CozyFooterBlock(ctx context.Context, content map[string]any) string { data := CozyFooterData{ ShowSignup: getBoolish(content, "showSignup", true), Affirmation: getStringOr(content, "affirmation", "Be gentle with yourself today."), MenuName: getString(content, "menuName"), Social: getStringSlice(content, "social"), } var buf bytes.Buffer _ = cozyFooterComponent(data).Render(ctx, &buf) return buf.String() } // CozyFooterData is the rendered view of the cozy-footer block. type CozyFooterData struct { ShowSignup bool Affirmation string MenuName string Social []string }