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

github.com/cntrump/hugo-notepadium.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvvveiii <cntrump@gmail.com>2020-06-07 16:09:59 +0300
committervvveiii <cntrump@gmail.com>2020-06-07 16:09:59 +0300
commit9a0c2181183fd017cf171069f2f607fd68a0b6ad (patch)
tree314faf1e965eb579beffdc05307038b5abefbdac
parent49a582a10ce7f00b303d610888a3fb2181513c0f (diff)
hide article bottom navigation link if title is empty.
-rw-r--r--layouts/partials/article-bottom-navigation.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/partials/article-bottom-navigation.html b/layouts/partials/article-bottom-navigation.html
index c27b30d..b60d971 100644
--- a/layouts/partials/article-bottom-navigation.html
+++ b/layouts/partials/article-bottom-navigation.html
@@ -1,10 +1,12 @@
{{- if and (not (eq .Params.single true)) (or .PrevInSection .NextInSection) -}}
<section class="article navigation">
{{- with .NextInSection -}}
- <p><a class="link" href="{{- .RelPermalink -}}"><span class="iconfont icon-article"></span>{{- .Title | safeHTML -}}</a></p>
+ {{- $title := .Title | safeHTML -}}
+ {{- if $title -}}<p><a class="link" href="{{- .RelPermalink -}}"><span class="iconfont icon-article"></span>{{- $title -}}</a></p>{{- end -}}
{{- end -}}
{{- with .PrevInSection -}}
- <p><a class="link" href="{{- .RelPermalink -}}"><span class="iconfont icon-article"></span>{{- .Title | safeHTML -}}</a></p>
+ {{- $title := .Title | safeHTML -}}
+ {{- if $title -}}<p><a class="link" href="{{- .RelPermalink -}}"><span class="iconfont icon-article"></span>{{- .Title | safeHTML -}}</a></p>{{- end -}}
{{- end -}}
</section>
{{- end -}} \ No newline at end of file