Add paigeshowfullpages page parameter

This commit is contained in:
Will Faught
2022-12-14 00:46:33 -08:00
parent 4fec568d74
commit 806f0cafe0
3 changed files with 33 additions and 16 deletions

View File

@@ -1,22 +1,36 @@
{{ if .Pages }}
{{ if .Params.paigeshowfullpages }}
{{ $p := .Paginate .Pages }}
{{ range $p.Pages }}
{{ partial "paige-main.html" . }}
{{ end }}
{{ if or $p.HasPrev $p.HasNext }}
<section>
{{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
{{ range $p.PageGroups }}
<h5 class="text-center">{{ .Key }}</h5>
{{ range .Pages }}
<p class="text-center">
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
{{ with .Description }}
<br>
{{ . | markdownify }}
{{ end }}
</p>
{{ end }}
{{ end }}
{{ if or $p.HasPrev $p.HasNext }}
<div class="d-flex justify-content-center">
{{ partial "paige-pagination.html" . }}
</div>
{{ end }}
</section>
{{ end }}
{{ else }}
{{ $p := .Paginate (.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
{{ range $p.PageGroups }}
<h5 class="text-center">{{ .Key }}</h5>
{{ range .Pages }}
<p class="text-center">
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
{{ with .Description }}
<br>
{{ . | markdownify }}
{{ end }}
</p>
{{ end }}
{{ end }}
{{ if or $p.HasPrev $p.HasNext }}
<section>
<div class="d-flex justify-content-center">
{{ partial "paige-pagination.html" . }}
</div>
</section>
{{ end }}
{{ end }}
{{ end }}