diff options
Diffstat (limited to 'layouts/partials/header/nav.html')
| -rw-r--r-- | layouts/partials/header/nav.html | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/layouts/partials/header/nav.html b/layouts/partials/header/nav.html index c0c20b3..94b073d 100644 --- a/layouts/partials/header/nav.html +++ b/layouts/partials/header/nav.html @@ -1,10 +1,14 @@ <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 + <ul> + {{ $currentPage := . }} + {{ range site.Menus.main }} + {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }} + {{- $page_url := $currentPage.Permalink | absLangURL }} + <li> + <a href="{{ .URL }}" class="{{ if eq $menu_item_url $page_url }} active {{ end }}"> + {{ .Name }} + </a> + </li> + {{ end }} + </ul> +</nav> |
