2016-03-17 11:01:39 +00:00
|
|
|
<nav id="sidebar">
|
|
|
|
<div id="header-wrapper">
|
|
|
|
<div id="header">
|
|
|
|
{{ partial "logo.html" . }}
|
|
|
|
</div>
|
2016-10-24 22:45:15 +00:00
|
|
|
{{ if .Site.Params.search }}
|
|
|
|
{{ partial "search.html" . }}
|
|
|
|
{{ end }}
|
2016-03-25 10:53:03 +00:00
|
|
|
</div>
|
2016-03-17 11:01:39 +00:00
|
|
|
|
|
|
|
|
2016-03-25 10:53:03 +00:00
|
|
|
<div class="highlightable">
|
|
|
|
<ul class="topics">
|
2017-03-13 23:10:33 +00:00
|
|
|
{{ if $.Site.Params.menu }}
|
|
|
|
{{ $.Scratch.Set "menuItems" $.Site.Params.menu }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $.Scratch.Set "_pages" (slice) }}
|
|
|
|
{{ range $key, $value := .Site.Sections }}
|
2017-03-27 19:57:49 +00:00
|
|
|
{{ $sectionPage := $.Site.GetPage "section" $key }}
|
|
|
|
{{ if $sectionPage.Content }}
|
|
|
|
{{ $.Scratch.Add "_pages" $sectionPage }}
|
|
|
|
{{ else if gt $value.Len 0 }}
|
|
|
|
{{ $.Scratch.Add "_pages" (index $value 0).Page }}
|
|
|
|
{{ end }}
|
2017-03-13 23:10:33 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ $.Scratch.Set "menuItems" (slice)}}
|
|
|
|
{{ range $key, $value := sort ($.Scratch.Get "_pages") "Weight" }}
|
|
|
|
{{ $.Scratch.Add "menuItems" $value.Section }}
|
|
|
|
{{ end }}
|
2016-10-14 07:30:59 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ $menuItems := $.Scratch.Get "menuItems" }}
|
|
|
|
{{ range $i, $key := $menuItems }}
|
2016-03-25 10:53:03 +00:00
|
|
|
{{ if ne $key "" }}
|
2016-10-14 07:30:59 +00:00
|
|
|
|
2017-03-27 19:57:49 +00:00
|
|
|
{{ $value := (index $.Site.Sections $key) }}
|
2017-03-13 23:10:33 +00:00
|
|
|
{{ $.Scratch.Set "_value" $value }}
|
2017-03-13 22:07:40 +00:00
|
|
|
{{ with $index := $.Site.GetPage "section" $key }}
|
2017-03-13 23:10:33 +00:00
|
|
|
{{ if .Content }}
|
2017-03-13 22:07:40 +00:00
|
|
|
{{ $.Scratch.Set "first" $index }}
|
2017-03-27 19:57:49 +00:00
|
|
|
{{ else if gt $value.Len 0}}
|
2017-03-13 23:10:33 +00:00
|
|
|
{{ $.Scratch.Set "first" (index $value 0).Page }}
|
2017-03-26 02:06:15 +00:00
|
|
|
{{ if gt $value.Len 1 }}
|
|
|
|
{{ $.Scratch.Set "_value" (after 1 $value) }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $.Scratch.Set "_value" nil }}
|
|
|
|
{{ end }}
|
2017-03-13 22:07:40 +00:00
|
|
|
{{ end }}
|
2016-10-14 07:30:59 +00:00
|
|
|
{{ end }}
|
2017-03-13 22:07:40 +00:00
|
|
|
{{ $first := $.Scratch.Get "first" }}
|
2017-03-13 23:10:33 +00:00
|
|
|
{{ $value := $.Scratch.Get "_value" }}
|
2016-03-17 11:01:39 +00:00
|
|
|
|
2017-03-27 19:57:49 +00:00
|
|
|
<li class="dd-item {{ if eq $.UniqueID $first.UniqueID }}active{{ end }} {{if eq $.Section $first.Section }}parent{{ end }}" data-nav-id="{{ $first.RelPermalink }}">
|
2016-03-25 10:53:03 +00:00
|
|
|
<a href="{{ $first.RelPermalink }}">
|
|
|
|
<span>
|
|
|
|
{{ if isset $first.Params "icon" }}
|
|
|
|
{{ printf $first.Params.icon | safeHTML }}
|
2016-03-21 15:58:15 +00:00
|
|
|
{{ end }}
|
2016-03-25 10:53:03 +00:00
|
|
|
{{ $first.Title }}
|
2017-03-27 19:57:49 +00:00
|
|
|
{{ if $.Site.Params.showVisitedLinks}}
|
2016-05-23 20:18:57 +00:00
|
|
|
<i class="fa fa-check read-icon"></i>
|
2016-05-24 14:08:53 +00:00
|
|
|
{{ end }}
|
2016-03-25 10:53:03 +00:00
|
|
|
</span>
|
|
|
|
</a>
|
2017-03-13 22:07:40 +00:00
|
|
|
{{ if gt $value.Len 0}}
|
2016-03-25 10:53:03 +00:00
|
|
|
<ul>
|
2016-10-14 07:30:59 +00:00
|
|
|
{{ range $k, $p := $value }}
|
2017-03-27 19:57:49 +00:00
|
|
|
<li class="dd-item {{ if eq $.UniqueID $p.Page.UniqueID }}active{{ end }}" data-nav-id="{{ $p.Page.RelPermalink }}">
|
2016-10-14 07:30:59 +00:00
|
|
|
<a href="{{ $p.Page.RelPermalink }}">
|
2017-03-27 19:57:49 +00:00
|
|
|
<span>{{ $p.Page.Title }} {{ if $.Site.Params.showVisitedLinks}} <i class="fa fa-check read-icon"> {{ end }} </i></span>
|
2016-03-25 10:53:03 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2016-03-17 11:01:39 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
2016-03-25 10:53:03 +00:00
|
|
|
{{ end }}
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
<hr>
|
2016-10-24 22:45:15 +00:00
|
|
|
{{ if .Site.Params.showVisitedLinks}}
|
2016-05-23 20:18:57 +00:00
|
|
|
<a class="padding" href="#" data-clear-history-toggle=""><i class="fa fa-fw fa-history"></i> Clear History</a>
|
2016-10-24 22:45:15 +00:00
|
|
|
{{ end }}
|
2016-03-25 10:53:03 +00:00
|
|
|
<section id="footer">
|
2017-02-27 14:01:50 +00:00
|
|
|
{{ partial "menu-footer.html" . }}
|
2016-03-25 10:53:03 +00:00
|
|
|
</section>
|
2016-03-17 11:01:39 +00:00
|
|
|
</div>
|
|
|
|
</nav>
|