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

github.com/hivickylai/hugo-theme-sam.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicky <vicky@vickylai.com>2018-05-03 17:09:52 +0300
committerVicky <vicky@vickylai.com>2018-05-03 17:09:52 +0300
commitc0374a93031da904af783dfdf12f94dc83e2d740 (patch)
tree0d137c3d13b688deb2bc048b0d0ea279ce1728e0 /layouts
parent8f26014a5a7943f29698f0fdb31af0d6694f8df6 (diff)
Fix for single menu item on all pages.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/gallery/list.html2
-rw-r--r--layouts/posts/single.html2
4 files changed, 7 insertions, 1 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index d00d90f..e37de05 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -8,4 +8,4 @@
{{ range after 1 .Site.Params.mainMenu }}
&#183; <a href="{{ .link }}">{{ .text }}</a>{{ end }}
{{ end }}
-&#183; <a href="{{.Site.BaseURL}}">{{ .Site.Params.homepage }}</a></p></div>{{ end }}<div class="section footer">{{ partial "footer.html" . }}</div></div></body>
+&#183; <a href="{{.Site.BaseURL}}">{{ .Site.Params.homepage }}</a></p></div>{{ end }}<div class="section footer">{{ partial "footer.html" . }}</div></div></body> \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 070539e..39f8efb 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,4 +1,6 @@
{{ partial "head.html" . }}<body><div class="wrap"><div class="section" id="title">{{ .Title }}</div><div class="section" id="content">{{ .Content }}</div>{{ if .Site.Params.mainMenu }}<div class="section bottom-menu"><hr/><p>{{ range first 1 .Site.Params.mainMenu }}<a href="{{ .link }}">{{ .text }}</a>{{ end }}
+{{ if ( gt ( len .Site.Params.mainMenu ) 1 ) }}
{{ range after 1 .Site.Params.mainMenu }}
&#183; <a href="{{ .link }}">{{ .text }}</a>{{ end }}
+{{ end }}
&#183; <a href="{{.Site.BaseURL}}">{{ .Site.Params.homepage }}</a></p></div>{{ end }}<div class="section footer">{{ partial "footer.html" . }}</div></div></body> \ No newline at end of file
diff --git a/layouts/gallery/list.html b/layouts/gallery/list.html
index 438e682..cb8351b 100644
--- a/layouts/gallery/list.html
+++ b/layouts/gallery/list.html
@@ -25,6 +25,8 @@
{{ range shuffle $files }}
<div><img src="{{ $src | absURL }}{{.Name }}"/></div>{{ end }}</div>{{ end }}
{{ if .Site.Params.mainMenu }}<div class="section bottom-menu"><hr/><p>{{ range first 1 .Site.Params.mainMenu }}<a href="{{ .link }}">{{ .text }}</a>{{ end }}
+{{ if ( gt ( len .Site.Params.mainMenu ) 1 ) }}
{{ range after 1 .Site.Params.mainMenu }}
&#183; <a href="{{ .link }}">{{ .text }}</a>{{ end }}
+{{ end }}
&#183; <a href="{{.Site.BaseURL}}">{{ .Site.Params.homepage }}</a></p></div>{{ end }}<div class="section footer">{{ partial "footer.html" . }}</div></div></body> \ No newline at end of file
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index e61ed97..7516de5 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -3,6 +3,8 @@
{{ with .Params.tags }}<div>{{ range . }}<span id="tag"><a href="{{ "tags/" | absURL }}{{ . | urlize }}">{{.}}</a></span>{{ end }}</div>{{ end }}<hr/>{{ .Content }}</div><div class="section bottom-menu"><hr/><p><a href="{{ .Section | relURL }}">back</a>{{ if .Site.Params.mainMenu }}
&#183;
{{ range first 1 .Site.Params.mainMenu }}<a href="{{ .link }}">{{ .text }}</a>{{ end }}
+{{ if ( gt ( len .Site.Params.mainMenu ) 1 ) }}
{{ range after 1 .Site.Params.mainMenu }}
&#183; <a href="{{ .link }}">{{ .text }}</a>{{ end }}
+{{ end }}
&#183; <a href="{{.Site.BaseURL}}">{{ .Site.Params.homepage }}</a>{{ end }}</p></div><div class="section footer">{{ partial "footer.html" . }}</div></div></body> \ No newline at end of file