Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-07-18 18:47:54 +0300
committerHanzei <hanzei@mailbox.org>2018-07-18 18:47:54 +0300
commit26d6a45c1c418ddbcee41e42c80e3a3f00d197a1 (patch)
tree24b343cd3a426ee1b0cc0c770cb2f3b863f18acb /layouts
parentebd3b152f4902dbdd0d33578ce5f8fd9aa59931f (diff)
Fix nav
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.html1
-rw-r--r--layouts/partials/nav.html11
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" }}
<!-- Range through all sections in /home execept contact.md -->
<div class="section" id="{{ .File.TranslationBaseName }}">
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 }}
<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 }}