hugo-theme-re-terminal/layouts/partials/menu.html

34 lines
1.1 KiB
HTML
Raw Normal View History

2022-11-07 23:34:01 +00:00
<nav class="navigation-menu">
<ul class="navigation-menu__inner menu--desktop">
2022-06-21 13:50:51 +00:00
{{ 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>
2022-11-07 23:34:01 +00:00
<ul class="menu">
<li class="menu__trigger">{{ $.Site.Params.MenuMore }}&nbsp;</li>
<li>
2022-11-07 23:34:01 +00:00
<ul class="menu__dropdown">
2022-11-06 08:16:27 +00:00
{{ 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>
2022-06-21 13:50:51 +00:00
</ul>
</li>
2022-06-21 13:50:51 +00:00
{{ end }}
{{ else }}
{{ range $.Site.Menus.main }}
{{ if not .HasChildren }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
{{ end }}
</ul>
2022-06-21 13:50:51 +00:00
</nav>