diff options
Diffstat (limited to 'layouts/partials/header/nav.html')
| -rw-r--r-- | layouts/partials/header/nav.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/partials/header/nav.html b/layouts/partials/header/nav.html new file mode 100644 index 0000000..c0c20b3 --- /dev/null +++ b/layouts/partials/header/nav.html @@ -0,0 +1,10 @@ +<nav> + <ul class="flex flex-wrap justify-center uppercase text-xs font-semibold gap-7 text-gray-500 "> + {{ $currentPage := . }} + {{ range site.Menus.main }} + {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }} + {{- $page_url:= $currentPage.Permalink | absLangURL }} + <li class="{{- if eq $menu_item_url $page_url }}text-gray-900{{else}}hover:text-gray-500{{ end -}}"><a href="{{ .URL }}">{{ .Name }}</a></li> + {{ end }} + </ul> +</nav>
\ No newline at end of file |
