From 26d6a45c1c418ddbcee41e42c80e3a3f00d197a1 Mon Sep 17 00:00:00 2001 From: Hanzei Date: Wed, 18 Jul 2018 17:47:54 +0200 Subject: [PATCH] Fix nav --- layouts/index.html | 1 - layouts/partials/nav.html | 11 +++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index dac49a5..b29ebca 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -40,7 +40,6 @@ {{ with .Site.GetPage "page" "home" }} {{ $home := . }} {{ range sort (.Resources.ByType "page") "Params.weight" }} - {{ if ne .Name "contact.md" }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index a619581..15f156c 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -39,9 +39,14 @@ {{ if not $isHome }} {{ i18n "nav_main" . }} {{ end }} - {{ with .Site.GetPage "page" "about" }} + + {{ with .Site.GetPage "page" "home" }} + {{ range sort (.Resources.ByType "page") "Params.weight" }} + {{ if ne .Name "contact.md" }} {{ .Title }} {{ 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" }} {{ .Title }} {{ end }} + {{ end }} {{ if gt (len $.Site.Home.AllTranslations.ByWeight) 1 }} {{ range $.Site.Home.AllTranslations.ByWeight }}