mirror of
https://github.com/Vimux/Binario.git
synced 2024-12-04 20:08:34 +00:00
18 lines
No EOL
977 B
HTML
18 lines
No EOL
977 B
HTML
{{- if .Site.Menus.main }}
|
|
<nav class="main-nav" role="navigation">
|
|
<button id="toggle" class="main-nav__btn" aria-expanded="false">
|
|
<svg class="main-nav__btn-icon icon-menu" width="18" height="18" viewBox="0 0 18 18">
|
|
<path class="icon-menu__burger" d="M18 0v3.6H0V0h18zM0 10.8h18V7.2H0v3.6zM0 18h18v-3.6H0V18z"/>
|
|
<path class="icon-menu__x" d="M11.55 9L18 15.45 15.45 18 9 11.55 2.55 18 0 15.45 6.45 9 0 2.55 2.55 0 9 6.45 15.45 0 18 2.55 11.55 9z"/>
|
|
</svg>
|
|
</button>
|
|
<ul id="menu" class="main-nav__list">
|
|
{{- $currentNode := . }}
|
|
{{- range sort .Site.Menus.main }}
|
|
{{- if .Name}}
|
|
<li class="main-nav__item{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} main-nav__item--active{{end}}">{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}{{ .Name }}{{ else }}<a class="main-nav__link" href="{{ .URL }}">{{ .Name }}</a>{{end}}</li>
|
|
{{- end }}
|
|
{{- end }}
|
|
</ul>
|
|
</nav>
|
|
{{- end }} |