IMPROVEMENT: organize the list logic
This commit is contained in:
parent
4b71d96e29
commit
3e3a45dde5
2 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
<h1 align=center>Hugo 主题 Moments | <a href="https://farseash.github.io/demo-hugo-theme-moments">Demo</a></h1>
|
||||
<h1 align=center>Hugo 主题 Moments | <a href="https://farseash.github.io/demo-hugo-theme-moments/moments">Demo</a></h1>
|
||||
|
||||
</br>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{{ define "main" }}
|
||||
<div class="container">
|
||||
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }}
|
||||
{{ $paginator := .Paginate (.Site.RegularPages.ByParam "top") }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ partial "row.html" . }}
|
||||
{{ end }}
|
||||
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
{{ define "pagination" }}
|
||||
{{ $paginator := .Paginate ((where .Site.RegularPages "Section" "moments").ByParam "top") }}
|
||||
{{ $paginator := .Paginate (.Site.RegularPages.ByParam "top") }}
|
||||
{{ if $paginator.HasPrev }}
|
||||
<a class="page-link" href="{{$.Site.BaseURL}}/{{sub $paginator.PageNumber 1 }}">
|
||||
<div class="page-item">< Prev</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue