feat(param): add option to disable read others functionality

This commit is contained in:
Gürkan Gür
2019-12-15 20:45:03 +01:00
committed by Gürkan Gür
parent 65ec26da81
commit 582c984f5f
2 changed files with 29 additions and 25 deletions
+27 -25
View File
@@ -30,32 +30,34 @@
<div class="post-content">
{{ .Content }}
</div>
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">
<div class="pagination__title">
<span
class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
<hr />
{{ if ne .Site.Params.disableReadOtherPosts true }}
{{ if or .NextInSection .PrevInSection }}
<div class="pagination">
<div class="pagination__title">
<span
class="pagination__title-h">{{ $.Site.Params.ReadOtherPosts }}</span>
<hr />
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon">←</span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon">→</span>
</a>
</span>
{{ end }}
</div>
</div>
<div class="pagination__buttons">
{{ if .NextInSection }}
<span class="button previous">
<a href="{{ .NextInSection.Permalink }}">
<span class="button__icon">←</span>
<span class="button__text">{{ .NextInSection.Title }}</span>
</a>
</span>
{{ end }}
{{ if .PrevInSection }}
<span class="button next">
<a href="{{ .PrevInSection.Permalink }}">
<span class="button__text">{{ .PrevInSection.Title }}</span>
<span class="button__icon">→</span>
</a>
</span>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
{{ partial "comments.html" . }}