Fix in menu partial to exclude home page. Updated README and screenshots.

This commit is contained in:
Fredrik Jonsson 2017-09-06 15:31:40 +02:00
commit 8b0b0410fe
6 changed files with 11 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# A Hugo theme based on the Drupal zen base theme
A very popular base theme for Drupal is [Zen](https://www.drupal.org/project/zen) by [JohnAlbin](https://www.drupal.org/u/johnalbin).
A very popular base theme for Drupal is [Zen](https://www.drupal.org/project/zen) by [JohnAlbin](https://www.drupal.org/u/johnalbin). This is a port of that theme for [Hugo :: A fast and modern static website engine](https://gohugo.io/).
This is a port of that theme for [Hugo :: A fast and modern static website engine](https://gohugo.io/).
The Zen grid system has been replaces with a modern CSS grid layout.
## Features
@ -30,6 +30,11 @@ This is a port of that theme for [Hugo :: A fast and modern static website engin
![screenshot](https://raw.githubusercontent.com/frjo/hugo-theme-zen/master/images/tn_mobil.png)
## The mobile manu
![screenshot](https://raw.githubusercontent.com/frjo/hugo-theme-zen/master/images/tn_mobil_menu.png)
## Installation
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Before After
Before After

BIN
images/tn_mobil_menu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -4,11 +4,14 @@
<h2 class="visually-hidden">{{ i18n "menu_title" }}</h2>
<ul class="navbar">
<li><a class="{{ if .IsHome }}active{{ end }}" href="/">{{ i18n "menu_home" }}</a></li>
{{ range after 1 (where .Site.Pages "Section" "") -}}
{{ range where .Site.Pages "Section" "" -}}
{{ if ne .RelPermalink "/" -}}
<li><a class="{{ if eq $currentID .UniqueID }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end -}}
{{ end -}}
{{ range $.Site.Home.Sections -}}
<li><a class="{{ if eq $currentSection .Section }}active{{ end }}" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end -}}
</ul>
</nav>