2019-01-28 03:11:02 +03:00
|
|
|
<nav class="menu">
|
2019-02-01 00:06:54 +03:00
|
|
|
<ul class="menu__inner menu__inner--desktop">
|
2019-02-01 12:15:28 +03:00
|
|
|
{{ if or $.Site.Params.showMenuItems ( eq .Site.Params.showMenuItems 0 ) }}
|
2019-02-01 00:06:54 +03:00
|
|
|
{{ range first $.Site.Params.showMenuItems $.Site.Menus.main }}
|
2019-02-01 10:39:12 +03:00
|
|
|
{{ if not .HasChildren }}
|
|
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end }}
|
2019-02-01 00:06:54 +03:00
|
|
|
{{ end }}
|
2019-02-01 18:00:11 +03:00
|
|
|
{{ if gt (len $.Site.Menus.main) $.Site.Params.showMenuItems }}
|
|
|
|
<ul class="menu__sub-inner">
|
2019-02-01 00:06:54 +03:00
|
|
|
<li class="menu__sub-inner-more-trigger">{{ $.Site.Params.MenuMore }} ▾</li>
|
|
|
|
|
|
|
|
<ul class="menu__sub-inner-more hidden">
|
|
|
|
{{ range last (sub (len $.Site.Menus.main) $.Site.Params.showMenuItems) $.Site.Menus.main }}
|
2019-02-01 10:39:12 +03:00
|
|
|
{{ if not .HasChildren }}
|
|
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end }}
|
2019-02-01 00:06:54 +03:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
2019-02-01 18:00:11 +03:00
|
|
|
</ul>
|
|
|
|
{{ end }}
|
2019-02-01 00:06:54 +03:00
|
|
|
{{ else }}
|
|
|
|
{{ range $.Site.Menus.main }}
|
2019-02-01 10:39:12 +03:00
|
|
|
{{ if not .HasChildren }}
|
|
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end }}
|
2019-02-01 00:06:54 +03:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul class="menu__inner menu__inner--mobile">
|
2019-01-29 13:18:14 +03:00
|
|
|
{{ range $.Site.Menus.main }}
|
2019-02-01 10:39:12 +03:00
|
|
|
{{ if not .HasChildren }}
|
|
|
|
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
|
|
|
{{ end }}
|
2019-01-28 03:11:02 +03:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
2019-01-29 13:18:14 +03:00
|
|
|
</nav>
|