This commit is contained in:
Hanzei 2018-07-18 17:47:54 +02:00
parent ebd3b152f4
commit 26d6a45c1c
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
2 changed files with 9 additions and 3 deletions

View file

@ -40,7 +40,6 @@
{{ with .Site.GetPage "page" "home" }}
{{ $home := . }}
{{ range sort (.Resources.ByType "page") "Params.weight" }}
{{ if ne .Name "contact.md" }}
<!-- Range through all sections in /home execept contact.md -->
<div class="section" id="{{ .File.TranslationBaseName }}">

View file

@ -39,9 +39,14 @@
{{ if not $isHome }}
<a class="navbar-item" href="{{ "/" | relLangURL }}">{{ i18n "nav_main" . }}</a>
{{ end }}
{{ with .Site.GetPage "page" "about" }}
{{ with .Site.GetPage "page" "home" }}
{{ range sort (.Resources.ByType "page") "Params.weight" }}
{{ if ne .Name "contact.md" }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | relLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ end }}
{{ end }}
{{ $pageIsInProjects := eq .Page.Section "projects"}}
{{ if not (and $pageIsInProjects (eq .Page.Kind "section")) }}
@ -77,9 +82,11 @@
{{ end }}
{{ end }}
{{ with .Site.GetPage "page" "contact" }}
{{ with .Site.GetPage "page" "home" }}
{{ with .Resources.GetMatch "contact.md" }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | relLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ end }}
{{ if gt (len $.Site.Home.AllTranslations.ByWeight) 1 }}
{{ range $.Site.Home.AllTranslations.ByWeight }}