commit c29fde8a7e061a93496d71cddef19643b45c8aa3 parent a294a7de510a91edd4a02eafc3457d28e94941a7 Author: breadcat <peter@minskio.co.uk> Date: Sun, 16 Aug 2020 12:41:08 +0100 Help with --minify Not sure why pagination insists on preserving whitespace, but don't feel like diagnosing. This fixes it Diffstat:
M | themes/Brine/layouts/_default/list.html | | | 6 | +++--- |
M | themes/Brine/layouts/partials/pagination.html | | | 8 | ++------ |
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/themes/Brine/layouts/_default/list.html b/themes/Brine/layouts/_default/list.html @@ -1,5 +1,4 @@ {{ define "main" }} <h1>{{ .Title }}</h1> - <ul>{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "posts") }}{{ range $paginator.Pages }} + <ul>{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Section" "posts") }}{{ range $paginator.Pages }} <li><h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3><span>{{ .PublishDate.Format "Jan 2, 2006" }}{{ if ne .Lastmod .PublishDate }} updated{{ end }}, {{ .ReadingTime }} min read</span></li>{{ end }} - </ul> -{{ partial "pagination.html" $ }}{{ end }} + </ul>{{ partial "pagination.html" $ }}{{ end }} +\ No newline at end of file diff --git a/themes/Brine/layouts/partials/pagination.html b/themes/Brine/layouts/partials/pagination.html @@ -1,5 +1 @@ -{{ with $.Paginator }}{{ if gt .TotalPages 1 }} <p class="pagination"> - {{ with .Prev }}<a href="{{ .URL }}">Previous</a> - {{ end }}{{ range .Pagers }}<a{{ if eq .PageNumber $.Paginator.PageNumber }} class="active"{{ end }} href="{{ .URL }}">{{ .PageNumber }}</a> - {{ end }}{{ with .Next }}<a href="{{ .URL }}">Next</a>{{ end }} - </p>{{ end }}{{ end }} -\ No newline at end of file +{{ with $.Paginator }}{{ if gt .TotalPages 1 }}<p class="pagination">{{ with .Prev }}<a href="{{ .URL }}">Previous</a>{{ end }}{{ range .Pagers }}<a{{ if eq .PageNumber $.Paginator.PageNumber }} class="active"{{ end }} href="{{ .URL }}">{{ .PageNumber }}</a>{{ end }}{{ with .Next }}<a href="{{ .URL }}">Next</a>{{ end }}</p>{{ end }}{{ end }} +\ No newline at end of file