package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // StatusBarBlockMeta defines metadata for the persistent status-bar rail. var StatusBarBlockMeta = blocks.BlockMeta{ Key: "status_bar", Title: "Status Bar", Description: "Persistent top rail with optional UTC clock, build hash, and callsign.", Source: "scifi-clean", Category: blocks.CategoryNavigation, } // StatusBarData drives the templ render. type StatusBarData struct { ShowClock bool ShowBuild bool Callsign string } // StatusBarBlock renders the persistent top rail. // Content shape: {"showClock": true, "showBuild": true, "callsign": "SCF-CLN"} func StatusBarBlock(ctx context.Context, content map[string]any) string { data := StatusBarData{ ShowClock: getBool(content, "showClock", true), ShowBuild: getBool(content, "showBuild", true), Callsign: getStringDefault(content, "callsign", "SCF-CLN"), } var buf bytes.Buffer _ = statusBarComponent(data).Render(ctx, &buf) return buf.String() }