June
f05175372c
All checks were successful
/ build (pull_request) Successful in 36s
Co-authored-by: c6ristian <c6ristian@christian.moe>
23 lines
768 B
HTML
23 lines
768 B
HTML
{{- $page := .page -}}
|
|
{{- $menuID := .menuID -}}
|
|
{{- $menuContent := index site.Menus .menuID -}}
|
|
|
|
<ul class="main-nav">
|
|
{{- if compare.Eq $menuID "main" -}}
|
|
<li><a href="/{{ .Site.Home.RelPermalink }}" class="in-nav-home">Home</a></li>
|
|
{{- end }}
|
|
{{- range $menuContent }}
|
|
<li>
|
|
{{- $attrs := dict "href" .URL }}
|
|
{{- if $page.IsMenuCurrent $menuID . -}}
|
|
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
|
|
{{- end -}}
|
|
<a
|
|
{{- range $k, $v := $attrs }}
|
|
{{- with $v }}
|
|
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
|
{{- end }}
|
|
{{- end -}}
|
|
>{{ or (T .Identifier) .Name | safeHTML }}</a></li>
|
|
{{- end }}
|
|
</ul>
|