Website/themes/mainroad/layouts/partials/menu.html
2018-07-11 20:45:17 +02:00

14 lines
No EOL
449 B
HTML

{{- 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 }}