blob: a07c04902462d329d131813f1b351b4b7e0c98a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{{ if eq 1 (len .Site.Sections) }}
<div class="main-menu">
<a href="{{ `/` | relURL }}">Home</a>
</div>
{{ else }}
<div class="dropdown">
<span class="dropbtn main-menu" 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 }}
|