diff options
author | Kevin Ottens <ervin@ipsquad.net> | 2018-10-29 20:44:11 +0300 |
---|---|---|
committer | Hanzei <16541325+hanzei@users.noreply.github.com> | 2018-10-29 20:44:11 +0300 |
commit | 563cf77fe15a904a93cb4aa5f18709ca64d9574e (patch) | |
tree | f360ec4d193e9c5d76a6d1223fb257b5700416af /layouts | |
parent | 04f47b3377dec109f02d9a6558187beb9158378d (diff) |
Restore home navbar (#90)
* Center the navbar again on the home page
* Favor the project page for listing projects
The project listing has its own page we can link to instead of going
back to the (potentially fading in) home page each time.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/nav.html | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index e726190..769660e 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -8,7 +8,7 @@ <span aria-hidden="true"></span> <span aria-hidden="true"></span> </a> - <div class="navbar-menu" id="navMenu"> + <div class="navbar-menu {{ if $isHome }}has-content-centered{{ end }}" id="navMenu"> <!-- look for custom menu and include it --> {{ if .Site.Menus.main }} {{ range .Site.Menus.main }} @@ -52,11 +52,8 @@ {{ if not (and $pageIsInProjects (eq .Page.Kind "section")) }} {{ with .Site.GetPage "/projects" }} {{ $totalProjects := (len .Pages) }} - {{ $numberOfProjectsToShow := .Site.Params.home.numberOfProjectsToShow | default $totalProjects }} {{ if $isHome }} <a class="navbar-item" href="{{ printf "#%s" (.Title | urlize) }}">{{ .Title }}</a> - {{ else if le $totalProjects $numberOfProjectsToShow }} - <a class="navbar-item" href="{{ printf "/#%s" (.Title | urlize) | relLangURL }}">{{ .Title }}</a> {{ else }} <a class="navbar-item" href="{{ .Permalink }}"> {{ if $pageIsInProjects }} |