fix bug
This commit is contained in:
parent
40dfc5036e
commit
d924172cc0
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
# 置顶
|
# 置顶 (如需置顶这片Moment, 则将值设定为大于0的整数)
|
||||||
top:
|
top: 0
|
||||||
|
|
||||||
# 名称(不填写则为设置的默认名称)
|
# 名称(不填写则为设置的默认名称)
|
||||||
name:
|
name:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="container bodycontainer">
|
<div class="container bodycontainer">
|
||||||
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }}
|
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top").Reverse }}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ partial "row.html" . }}
|
{{ partial "row.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
|
|
||||||
{{ define "pagination" }}
|
{{ define "pagination" }}
|
||||||
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }}
|
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top").Reverse }}
|
||||||
{{ if $paginator.HasPrev }}
|
{{ if $paginator.HasPrev }}
|
||||||
<li class="page-item">
|
<li class="page-item">
|
||||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub $paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub $paginator.PageNumber 1 }}" tabindex="-1">Previous</a>
|
||||||
|
|
Loading…
Add table
Reference in a new issue