68 lines
2.2 KiB
HTML
68 lines
2.2 KiB
HTML
<nav class="menu hidden-on-mobile">
|
|
<ul class="menu__inner menu__inner--desktop">
|
|
{{ if or $.Site.Params.showMenuItems ( eq .Site.Params.showMenuItems 0 ) }}
|
|
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
|
|
{{ if not .HasChildren }}
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
|
<li>
|
|
<ul class="menu__sub-inner">
|
|
<li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} ▾</li>
|
|
<li>
|
|
<ul class="menu__sub-inner-more hidden">
|
|
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
|
|
{{ if not .HasChildren }}
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
{{ end }}
|
|
{{ else }}
|
|
{{ range $.Site.Menus.main }}
|
|
{{ if not .HasChildren }}
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
|
|
<!-- <div class="spacer"></div> -->
|
|
<li>
|
|
<ul class="language-selector">
|
|
<li>
|
|
<ul class="language-selector-current">
|
|
<li>{{ .Language.LanguageName }} ▾</li>
|
|
</ul>
|
|
<ul class="language-selector__more hidden">
|
|
{{ range $.Site.Home.AllTranslations }}
|
|
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
|
{{ end }}
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
<ul class="menu__inner menu__inner--mobile">
|
|
{{ range $.Site.Menus.main }}
|
|
{{ if not .HasChildren }}
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }}
|
|
<hr />
|
|
{{ range $.Site.Home.AllTranslations }}
|
|
<li>
|
|
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|