summaryrefslogtreecommitdiff
path: root/themes/lugo/layouts/partials/nav.html
diff options
context:
space:
mode:
authorHenrique Marques <[email protected]>2024-08-17 08:28:46 +0100
committerHenrique Marques <[email protected]>2024-08-17 08:28:46 +0100
commit8113f43b368e83fe51800b8ffc78681821d011f4 (patch)
treedf3464f78e09a427952e65525bb5490aeb642cc1 /themes/lugo/layouts/partials/nav.html
parenta57cff1c177f91d243ce6313015ab4867fa88027 (diff)
add new files
Diffstat (limited to 'themes/lugo/layouts/partials/nav.html')
-rw-r--r--themes/lugo/layouts/partials/nav.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/themes/lugo/layouts/partials/nav.html b/themes/lugo/layouts/partials/nav.html
new file mode 100644
index 0000000..a7318fe
--- /dev/null
+++ b/themes/lugo/layouts/partials/nav.html
@@ -0,0 +1,8 @@
+<nav>
+ <ul>
+ {{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}}
+ {{ range.Site.Menus.main.ByWeight }}{{ $base := path.Base .URL }}
+ <li><a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></a></li>
+ {{- end }}
+ </ul>
+</nav>