Website/themes/mainroad/layouts/partials/menu.html

14 lines
449 B
HTML
Raw Permalink Normal View History

2018-07-11 20:45:17 +02:00
{{- if .Site.Menus.main }}
<nav class="menu">
<ul class="menu__list">
{{- $currentNode := . }}
{{- range sort .Site.Menus.main }}
{{- if .Name}}
<li class="menu__item{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} menu__item--active{{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li>
{{- end }}
{{- end }}
</ul>
</nav>
{{ else -}}
<div class="divider"></div>
{{- end }}