Updated for how sections work in Hugo v0.23.
This commit is contained in:
parent
4047401c37
commit
5515bae2cc
3 changed files with 11 additions and 17 deletions
|
|
@ -5,14 +5,11 @@
|
||||||
<h2 class="visually-hidden">Main menu</h2>
|
<h2 class="visually-hidden">Main menu</h2>
|
||||||
<ul class="navbar clearfix">
|
<ul class="navbar clearfix">
|
||||||
<li><a class="{{ if .IsHome }}active{{ end }}" href="/">Home</a></li>
|
<li><a class="{{ if .IsHome }}active{{ end }}" href="/">Home</a></li>
|
||||||
{{ range $section, $taxonomy := .Site.Sections -}}
|
{{ range after 1 (where .Site.Pages "Section" "") -}}
|
||||||
{{ if eq $section "" -}}
|
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
{{ range $taxonomy.Pages -}}
|
|
||||||
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
|
||||||
{{ end -}}
|
|
||||||
{{ else -}}
|
|
||||||
<li><a class="{{ if eq $currentSection $section }}active{{ end }}" href="/{{ urlize $section }}">{{ humanize $section }}</a></li>
|
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
{{ range $.Site.Home.Sections -}}
|
||||||
|
<li><a class="{{ if eq $currentSection .Section }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,13 @@
|
||||||
{{ $currentSection := .Section }}
|
|
||||||
{{ $currentID := .UniqueID }}
|
{{ $currentID := .UniqueID }}
|
||||||
<aside class="layout-3col__right-sidebar" role="complementary">
|
<aside class="layout-3col__right-sidebar" role="complementary">
|
||||||
{{ range $section, $taxonomy := .Site.Sections -}}
|
{{ range $.Site.Home.Sections -}}
|
||||||
{{ if ne $section "" -}}
|
|
||||||
<section>
|
<section>
|
||||||
<h4 class="menu"><a class="{{ if eq $currentSection $section }}active{{ end }}" href="/{{ urlize $section }}">{{ humanize $section }}</a></h4>
|
<h4 class="menu"><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></h4>
|
||||||
<ul class="menu">
|
<ul class="menu">
|
||||||
{{ range $taxonomy.Pages -}}
|
{{ range .Pages -}}
|
||||||
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
|
||||||
</aside>
|
</aside>
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ description = "A port of the Drupal zen base theme with libsass and gulp support
|
||||||
homepage = "https://github.com/frjo/hugo-theme-zen"
|
homepage = "https://github.com/frjo/hugo-theme-zen"
|
||||||
license = "GPLv2"
|
license = "GPLv2"
|
||||||
licenselink = "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
|
licenselink = "http://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
|
||||||
tags = ["simple", "articles"]
|
tags = ["simple", "articles", "blog"]
|
||||||
features = ["responsive", "grid", "sass", "gulp", "search"]
|
features = ["responsive", "grid", "sass", "gulp", "search", "piwik", "jsonfeed"]
|
||||||
min_version = 0.18
|
min_version = 0.23
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Fredrik Jonsson"
|
name = "Fredrik Jonsson"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue