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 ) }}
|
2024-08-02 13:35:24 +00:00
|
|
|
{{/* get first amount of item */}}
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
|
|
|
|
{{ if not .HasChildren }}
|
2023-04-13 21:24:56 +00:00
|
|
|
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
2024-08-02 13:35:24 +00:00
|
|
|
{{ else }}
|
|
|
|
<li>
|
|
|
|
<ul class="menu">
|
|
|
|
<li class="menu__trigger">{{ .Name }} ▾</li>
|
|
|
|
<li>
|
|
|
|
<ul class="menu__dropdown">
|
|
|
|
{{ range .Children }}
|
|
|
|
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
2022-11-03 19:05:40 +00:00
|
|
|
<li>
|
2022-11-07 23:34:01 +00:00
|
|
|
<ul class="menu">
|
|
|
|
<li class="menu__trigger">{{ $.Site.Params.MenuMore }} ▾</li>
|
2022-11-03 19:05:40 +00:00
|
|
|
<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 }}
|
2023-04-13 21:24:56 +00:00
|
|
|
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
2024-08-02 13:35:24 +00:00
|
|
|
{{ else }}
|
|
|
|
<li class="menu__subdrop--title">▾ {{ .Name }}</li>
|
|
|
|
<li>
|
|
|
|
<ul class="menu__subdrop--list">
|
|
|
|
{{ range .Children }}
|
|
|
|
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</li>
|
2022-11-06 08:16:27 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-11-03 19:05:40 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
2022-06-21 13:50:51 +00:00
|
|
|
</ul>
|
2022-11-03 19:05:40 +00:00
|
|
|
</li>
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
{{ range $.Site.Menus.main }}
|
|
|
|
{{ if not .HasChildren }}
|
2023-04-13 21:24:56 +00:00
|
|
|
<li><a href="{{ .URL }}" {{ if .Params.NewTab -}} target="_blank" {{- end }}>{{ .Name }}</a></li>
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-11-06 09:05:46 +00:00
|
|
|
</ul>
|
2022-06-21 13:50:51 +00:00
|
|
|
</nav>
|