personal-website/layouts/partials/body/nav.html

16 lines
574 B
HTML
Raw Permalink Normal View History

2023-08-30 15:41:50 +02:00
<nav>
<div class="hero-text float-left"><a href="/" class="nav-link special">{{ .Site.Title }}</a></div>
<div class="float-right">
{{ $currentPage := . }}
{{- range site.Menus.main -}}
{{- $menu_item_url := .URL -}}
{{- $page_url:= $currentPage.RelPermalink -}}
{{- if eq $menu_item_url $page_url -}}
<a href="{{ .URL }}" class="disabled" aria-current="page">{{ .Name }}</a>
{{- else -}}
2024-07-18 10:05:04 +02:00
<a href="{{ .URL }}" class="nav-link" data-umami-event="{{ .Name }}">{{ .Name }}</a>
2023-08-30 15:41:50 +02:00
{{- end -}}
{{- end }}
</div>
2024-07-18 10:05:04 +02:00
</nav>