This repository has been archived on 2023-09-28. You can view files and clone it, but cannot push or open issues or pull requests.
homepage/themes/terminal/layouts/partials/menu.html

34 lines
1.1 KiB
HTML

<nav class="navigation-menu">
<ul class="navigation-menu__inner menu--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">
<li class="menu__trigger">{{ $.Site.Params.MenuMore }}&nbsp;</li>
<li>
<ul class="menu__dropdown">
{{ 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 }}
</ul>
</nav>