Merge pull request #267 from undergroundwires/bottomnav
make pagination customizable
This commit is contained in:
commit
59108f1e12
4 changed files with 30 additions and 30 deletions
|
@ -30,6 +30,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination-list.html" . }}
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
28
layouts/partials/pagination-single.html
Normal file
28
layouts/partials/pagination-single.html
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{{ if and (not $.Site.Params.DisableReadOtherPosts) (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>
|
||||||
|
{{ end }}
|
|
@ -112,35 +112,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ if and (not $.Site.Params.DisableReadOtherPosts) (or .NextInSection .PrevInSection) }}
|
{{ partial "pagination-single.html" . }}
|
||||||
<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>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
|
|
||||||
{{ if .Site.DisqusShortname }}
|
{{ if .Site.DisqusShortname }}
|
||||||
{{ if not (eq .Params.Comments "false") }}
|
{{ if not (eq .Params.Comments "false") }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue