bug fix about reverse
This commit is contained in:
parent
d924172cc0
commit
d8e369f6d7
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
# 置顶 (如需置顶这片Moment, 则将值设定为大于0的整数)
|
||||
top: 0
|
||||
# 置顶 (如需置顶这片Moment, 则将值设定为大于0的整数, 值越小越靠前,例如1会将moment放在最顶端)
|
||||
top:
|
||||
|
||||
# 名称(不填写则为设置的默认名称)
|
||||
name:
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue