From 97ad3cbee2b3a23c0a9210d1175a33aa509a0166 Mon Sep 17 00:00:00 2001 From: maddalax Date: Fri, 25 Oct 2024 11:30:50 -0500 Subject: [PATCH] add top banner --- htmgo-site/partials/navbar.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htmgo-site/partials/navbar.go b/htmgo-site/partials/navbar.go index 75c6b48..9cc7db0 100644 --- a/htmgo-site/partials/navbar.go +++ b/htmgo-site/partials/navbar.go @@ -78,7 +78,15 @@ func Star(ctx *h.RequestContext) *h.Element { } func NavBar(ctx *h.RequestContext, props NavBarProps) *h.Element { - + banner := h.If( + true, + h.A( + h.Class("bg-blue-200 text-slate-700 text-center p-2 flex items-center justify-center"), + h.Href("https://github.com/maddalax/htmgo/releases/tag/framework%2Fv1.0.1"), + h.Attribute("target", "_blank"), + h.Text("htmgo v1.0.1 is released and it includes a new automatic formatter, view release notes"), + ), + ) desktopNav := h.Nav( h.Class("hidden sm:block bg-neutral-100 border border-b-slate-300 p-4 md:p-3 max-h-[100vh - 9rem] overflow-y-auto"), h.Div( @@ -116,6 +124,7 @@ func NavBar(ctx *h.RequestContext, props NavBarProps) *h.Element { return h.Div( h.Id("navbar"), + banner, MobileNav(ctx, props.Expanded), desktopNav, )