bug fix about reverse

This commit is contained in:
FarseaSH 2021-08-11 12:02:44 +08:00
parent d924172cc0
commit d8e369f6d7
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{{ define "main" }}
<div class="container bodycontainer">
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top").Reverse }}
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }}
{{ range $paginator.Pages }}
{{ partial "row.html" . }}
{{ end }}
@ -9,7 +9,7 @@
{{ define "pagination" }}
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top").Reverse }}
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }}
{{ if $paginator.HasPrev }}
<li class="page-item">
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub $paginator.PageNumber 1 }}" tabindex="-1">Previous</a>