cleanup exiting pagination ; add pagination to main page
This commit is contained in:
parent
dfa8559a7a
commit
ed8ddef21d
|
@ -4,7 +4,7 @@ languageCode = "en-us"
|
|||
title = "KemoNine's Culinary Notebook"
|
||||
theme = "gochowdown"
|
||||
defaultcontentlanguage = "en"
|
||||
paginate = 20
|
||||
paginate = 21
|
||||
canonifyurls = true
|
||||
pygmentsstyle = "monokai"
|
||||
pygmentscodefences = true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="home">
|
||||
<div class="recipes xs-px1 xs-mt2">
|
||||
<div class="clearfix">
|
||||
{{ range sort (where site.RegularPages "Type" "in" site.Params.mainSections) "Title" }}
|
||||
`{{ range ( .Paginate (sort (where site.RegularPages "Type" "in" site.Params.mainSections) "Title" )).Pages }}`
|
||||
<div class="sm-col sm-col-6 md-col-6 lg-col-4 xs-px1 xs-mb2">
|
||||
<a class="block relative bg-blue" href="{{ .RelPermalink }}">
|
||||
{{ if .Params.Image }}
|
||||
|
@ -17,4 +17,5 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{ if ne $paginator.PageNumber 1 }}
|
||||
<li><a href="{{ $paginator.First.URL }}">«</a></li>
|
||||
{{ end }}
|
||||
<li class="hidden"><a href="{{ $paginator.Prev.URL }}">‹</a></li>
|
||||
<li><a href="{{ $paginator.Prev.URL }}">‹</a></li>
|
||||
{{ end }}
|
||||
{{ range $paginator.Pagers }}
|
||||
{{ $.Scratch.Set "page_number_flag" false }}
|
||||
|
@ -39,7 +39,7 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $paginator.HasNext }}
|
||||
<li class="hidden"><a href="{{ $paginator.Next.URL }}">›</a></li>
|
||||
<li><a href="{{ $paginator.Next.URL }}">›</a></li>
|
||||
{{ if ne $paginator.PageNumber $paginator.TotalPages }}
|
||||
<li><a href="{{ $paginator.Last.URL }}">»</a></li>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue