package main import ( "bytes" "context" "git.dev.alexdunmow.com/block/core/blocks" ) // ChromeNavbarBlockMeta declares the y2k chrome navbar. var ChromeNavbarBlockMeta = blocks.BlockMeta{ Key: "chrome_navbar", Title: "Chrome Navbar", Description: "Beveled chrome navigation bar with hover sparkle.", Source: "y2k", Category: blocks.CategoryNavigation, } // ChromeNavbarBlock renders the navbar. // Content: {menuName, logoText, logoImage} func ChromeNavbarBlock(ctx context.Context, content map[string]any) string { data := ChromeNavbarData{ MenuName: getStringOr(content, "menuName", "main"), LogoText: getString(content, "logoText"), LogoImage: getString(content, "logoImage"), } var buf bytes.Buffer _ = chromeNavbarComponent(data).Render(ctx, &buf) return buf.String() } // ChromeNavbarData is the typed shape for the templ component. type ChromeNavbarData struct { MenuName string LogoText string LogoImage string }