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 }}