summaryrefslogtreecommitdiff
path: root/themes/fredo/layouts/_partials/nav.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/fredo/layouts/_partials/nav.html')
-rw-r--r--themes/fredo/layouts/_partials/nav.html20
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>