From 46e5213b367fe679baaa7d7713ec62dc4d5b3ea4 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 30 Jun 2024 03:00:03 +0400 Subject: [PATCH] Place navigation inside a base template. --- web/base.templ | 54 +++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/web/base.templ b/web/base.templ index 19808e7..748e900 100644 --- a/web/base.templ +++ b/web/base.templ @@ -33,7 +33,30 @@ templ base(title, description, keywords, canonical string, head templ.Component) Arav's dwelling Welcome to my sacred place, wanderer - @navigation(title) + {{ mainNavSections := []string{"Stuff", "Mindflow", "About", "Guestbook"} }} + {{ mainNavLinks := []templ.SafeURL{"/stuff", "/mindflow", "/about", "/guestbook"} }} +
{ children... } @@ -45,31 +68,4 @@ templ base(title, description, keywords, canonical string, head templ.Component) -} - -templ navigation(title string) { - {{ sections := []string{"Stuff", "Mindflow", "About", "Guestbook"} }} - {{ links := []templ.SafeURL{"/stuff", "/mindflow", "/about", "/guestbook"} }} - -} +} \ No newline at end of file