From 0dc9a5327a49a81532914ba385806b01e5c7f7da Mon Sep 17 00:00:00 2001 From: Max Bosche Date: Thu, 18 Apr 2019 09:10:42 +0200 Subject: fixed "Back to Blog" and "Back to Projects" --- layouts/partials/nav.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'layouts') diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 6cb0532..96c841f 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -55,10 +55,36 @@ {{ if ne .Name "contact.md" }} {{ if eq .File.Dir "projects/" }} + {{ if $isHome }} {{ .Title }} + {{ else }} + {{ $pageIsInProjects := eq $.Page.Section "project"}} + {{ if not (and $pageIsInProjects (eq $.Page.Kind "section")) }} + + {{ if $pageIsInProjects }} + {{ i18n "nav_backToSection" . }} + {{ else }} + {{ .Title | singularize}} + {{ end }} + + {{ end }} + {{ end }} {{ else if eq .File.Dir "blog/" }} + {{ if $isHome }} {{ .Title }} + {{ else }} + {{ $pageIsInBlog := eq $.Page.Section "blog"}} + {{ if not (and $pageIsInBlog (eq $.Page.Kind "section")) }} + + {{ if $pageIsInBlog }} + {{ i18n "nav_backToSection" . }} + {{ else }} + {{ .Title | singularize}} + {{ end }} + + {{ end }} + {{ end }} {{ else }} {{ .Title }} {{ end }} -- cgit v1.2.3