diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-09-29 19:17:13 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-10-01 07:51:11 +0200 |
| commit | 4c41e477e13d37e187c8de4225c7e8056bd9ed28 (patch) | |
| tree | 33a7b51a0ed2c2ae207fc8f89f1454ccb77596a5 /layouts/partials/header/nav.html | |
| parent | 4720b07e9f18915cf1f6466245a92dedd11fdc55 (diff) | |
Internalise theme
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> |
