mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
60 lines
2.2 KiB
HTML
60 lines
2.2 KiB
HTML
<nav id="sidebar">
|
|
<div id="header-wrapper">
|
|
<div id="header">
|
|
{{ partial "logo.html" . }}
|
|
{{ if .Site.Params.search }}
|
|
<div class="searchbox">
|
|
<label for="search-by"><i class="fa fa-search"></i></label>
|
|
<input id="search-by" type="text" placeholder="Search Documentation" data-search-input="/lunr.json/query">
|
|
<span data-search-clear=""><i class="fa fa-close"></i></span>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="highlightable">
|
|
<ul class="topics">
|
|
{{ $page := . }}
|
|
{{ range $key , $value := .Site.Sections }}
|
|
{{ if ne $key "" }}
|
|
{{ $first := (index $value 0).Page }}
|
|
|
|
<li class="dd-item {{ if eq $page.RelPermalink $first.RelPermalink }}active{{ end }} {{if in $page.RelPermalink $first.RelPermalink }}parent{{ end }}" data-nav-id="{{ $first.RelPermalink }}">
|
|
<a href="{{ $first.RelPermalink }}">
|
|
<span>
|
|
{{ if isset $first.Params "icon" }}
|
|
{{ printf $first.Params.icon | safeHTML }}
|
|
{{ end }}
|
|
{{ $first.Title }}
|
|
{{ if $page.Site.Params.showVisitedLinks}}
|
|
<i class="fa fa-check read-icon"></i>
|
|
{{ end }}
|
|
</span>
|
|
</a>
|
|
{{ if gt .Pages.Len 1}}
|
|
<ul>
|
|
{{ range $k, $p := .Pages }}
|
|
{{ if gt $k 0 }}
|
|
<li class="dd-item {{ if eq $page.RelPermalink $p.RelPermalink }}active{{ end }}" data-nav-id="{{ $p.RelPermalink }}">
|
|
<a href="{{ $p.RelPermalink }}">
|
|
<span>{{ $p.Title }} {{ if $page.Site.Params.showVisitedLinks}} <i class="fa fa-check read-icon"> {{ end }} </i></span>
|
|
</a>
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
<hr>
|
|
{{ if .Site.Params.showVisitedLinks}}
|
|
<a class="padding" href="#" data-clear-history-toggle=""><i class="fa fa-fw fa-history"></i> Clear History</a>
|
|
{{ end }}
|
|
<section id="footer">
|
|
<p>Built with <a href="https://github.com/matcornic/hugo-theme-learn"><i class="fa fa-heart"></i></a> from <a href="http://getgrav.org">Grav</a> and <a href="http://gohugo.io/">Hugo</a></p>
|
|
</section>
|
|
</div>
|
|
</nav>
|