blob: 82cd6ff4332bad7c4d8fac2873c11aaa783383ae (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<header class="header">
<ul class="menu clearfix control">
<li>
<a href="{{ .Site.BaseURL }}" class="btn logo-link">
{{ partial "logo.html" . }}
</a>
</li>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
{{ $name := .Name }}
<li {{if (eq $name "Theme")}} id="theme-switcher" {{end}}
class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
<a class="btn" id="theme-switcher-button">
{{ $name }}
</a>
<ul class="sub-menu control">
{{ range .Children }}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
<a href="{{ .URL }}"
{{if (eq $name "Theme") }}
{{if (eq .Identifier "export-wild") }}
class="{{.Identifier}} btn"
{{else}}
data-theme="{{.Identifier}}" class="btn"
{{end}}
{{else}}
class="btn {{ .Identifier }}"
{{end}}>{{ .Name }}</a>
</li>
{{ end }}
</ul>
</li>
{{ else }}
<li>
<a href="{{ .URL }}" class="btn">
{{ .Name }}
</a>
</li>
{{ end }}
{{ end }}
</ul>
</header>
|