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 @@
---
# 置顶 (如需置顶这片Moment, 则将值设定为大于0的整数)
top: 0
# 置顶 (如需置顶这片Moment, 则将值设定为大于0的整数, 值越小越靠前,例如1会将moment放在最顶端)
top:
# 名称(不填写则为设置的默认名称)
name:

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>