blob: 01d86f7f835e2595c50f70f2a259409010f92604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{{ if eq (len (where .Site.Sections "Params.hidefrommenu" "!=" true)) 1 }}
<div class="main-menu">
{{ with (index (where .Site.Sections "Params.hidefrommenu" "!=" true) 0) }}
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
</div>
{{ else }}
<div class="dropdown main-menu">
<span class="dropbtn" onclick="toggleHeight(this.nextElementSibling)">
Sections <i class="fas fa-chevron-down"></i>
</span>
<div class="dropdown-content">
<div class="rounded bg-light mt-2">
<ul class="list-unstyled m-0">
{{ range where .Site.Sections "Params.hidefrommenu" "!=" true }}
{{ $thisSection := replace .File.Dir "\\" "" }}
<li class="dropdown-link pl-3 pr-3 pt-1 pb-1 rounded">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
{{ end }}
|