Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/tummychow/lanyon-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r--layouts/partials/sidebar.html24
1 files changed, 15 insertions, 9 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 53936b3..12a0a09 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -5,23 +5,29 @@
<!-- Toggleable sidebar -->
<div class="sidebar" id="sidebar">
<div class="sidebar-item">
- <p>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>.</p>
+ <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" }}
+ {{- $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 }}
+ {{ end -}}
+ {{ end -}}
- <a class="sidebar-nav-item" href="{{ .Site.Params.Github.Url }}/archive/{{ .Site.Params.Github.Head }}.zip">Download</a>
- <a class="sidebar-nav-item" href="{{ .Site.Params.Github.Url }}">GitHub project</a>
- <span class="sidebar-nav-item">Currently on {{ .Site.Params.Github.Head }}</span>
+ {{- 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">