blob: 12a0a091e8868c752de98761b4530113097e38e5 (
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
|
<!-- Target for toggling the sidebar `.sidebar-checkbox` is for regular
styles, `#sidebar-checkbox` for behavior. -->
<input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox">
<!-- Toggleable sidebar -->
<div class="sidebar" id="sidebar">
<div class="sidebar-item">
<p>{{ if .Site.Params.description }}{{ .Site.Params.description }}{{ else }}A reserved <a href="http://jekyllrb.com" target="_blank">Jekyll</a> theme that places the utmost gravity on content with a hidden drawer. Made by <a href="https://twitter.com/mdo" target="_blank">@mdo</a>.{{ end }}</p>
</div>
<nav class="sidebar-nav">
<a class="sidebar-nav-item {{ if .IsHome }} active {{ end }}" href="/">Home</a>
<a class="sidebar-nav-item {{ if eq .RelPermalink "/post/" }} active {{ end }}" href="/post">Posts</a>
{{- $currentPage := . }}
{{- range .Site.Menus.main -}}
<a class="sidebar-nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
{{- end -}}
{{- $thisperma := .Permalink }}
{{ range .Site.Pages.ByWeight -}}
{{ if isset .Params "sidebar" -}}
<a class="sidebar-nav-item {{ if eq .Permalink $thisperma }} active {{ end }}" href="{{ .Permalink }}">{{ .Title }}</a>
{{ end -}}
{{ end -}}
{{- with .Site.Params.Github }}
<a class="sidebar-nav-item" href="{{ .url }}/archive/{{ .head }}.zip">Download</a>
<a class="sidebar-nav-item" href="{{ .url }}">GitHub project</a>
<span class="sidebar-nav-item">Currently on {{ .head }}</span>
{{ end -}}
</nav>
<div class="sidebar-item">
<p>© {{ .Site.LastChange.Year }}. All rights reserved.</p>
</div>
</div>
|