add pagination to short list with full content
This commit is contained in:
parent
78a72c29a6
commit
03c0eb6f81
@ -7,7 +7,13 @@
|
|||||||
<h1 class="post-title">{{ i18n .Title }}</h1>
|
<h1 class="post-title">{{ i18n .Title }}</h1>
|
||||||
{{ $showFullContent := in .Site.Params.sectionsWithFullContentOnListPage .Section }}
|
{{ $showFullContent := in .Site.Params.sectionsWithFullContentOnListPage .Section }}
|
||||||
{{ $pages := where .Pages "Params.hidden" "!=" true}}
|
{{ $pages := where .Pages "Params.hidden" "!=" true}}
|
||||||
{{ range $pages }}
|
|
||||||
|
{{ $pagesRange := $pages}}
|
||||||
|
{{ if $showFullContent }}
|
||||||
|
{{ $pagesRange = (.Paginate $pages).Pages }}
|
||||||
|
{{ end}}
|
||||||
|
|
||||||
|
{{ range $pagesRange }}
|
||||||
<div class="post-short-list h-entry">
|
<div class="post-short-list h-entry">
|
||||||
<div class="post-header">
|
<div class="post-header">
|
||||||
<header>
|
<header>
|
||||||
@ -21,6 +27,9 @@
|
|||||||
{{ partial "post-info.html" . }}
|
{{ partial "post-info.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if $showFullContent }}
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
|
{{ end}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user