diff options
author | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
---|---|---|
committer | Friedrich Beckmann <friedrich.beckmann@gmx.de> | 2025-06-14 13:48:40 +0200 |
commit | e4a8a804aa5353bcaa4403da291e02bd9fcd22db (patch) | |
tree | 140e3b62e66c10952392c6c1bb36104d40d4e24a /themes/fredo/layouts/_partials/nav.html |
initial version
Diffstat (limited to 'themes/fredo/layouts/_partials/nav.html')
-rw-r--r-- | themes/fredo/layouts/_partials/nav.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/themes/fredo/layouts/_partials/nav.html b/themes/fredo/layouts/_partials/nav.html new file mode 100644 index 0000000..583eefe --- /dev/null +++ b/themes/fredo/layouts/_partials/nav.html @@ -0,0 +1,20 @@ +<div id="topbar"> + <div id="logo"> + <a href="/"> + <picture> + <img src="/favicon.png"></img> + </picture> + </a> + </div> + <nav id="nav"> + {{ $currentpage := . }} + {{ range site.Menus.main }} + {{ $url := relLangURL .URL }} + {{ $navlinkclass := "navlink" }} + {{- if or ( $currentpage.IsMenuCurrent "main" .) ( $currentpage.HasMenuCurrent "main" .) }} + {{ $navlinkclass = "navlink active" }} + {{ end }} + <a class={{ $navlinkclass }} href="{{ $url }}">{{ .Name }}</a> + {{ end }} + </nav> +</div> |