Skip to content

Commit

Permalink
hide article bottom navigation link if title is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
cntrump committed Jun 7, 2020
1 parent 49a582a commit 9a0c218
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/partials/article-bottom-navigation.html
Original file line number Diff line number Diff line change
@@ -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 -}}

0 comments on commit 9a0c218

Please sign in to comment.