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"
|
title = "KemoNine's Culinary Notebook"
|
||||||
theme = "gochowdown"
|
theme = "gochowdown"
|
||||||
defaultcontentlanguage = "en"
|
defaultcontentlanguage = "en"
|
||||||
paginate = 20
|
paginate = 21
|
||||||
canonifyurls = true
|
canonifyurls = true
|
||||||
pygmentsstyle = "monokai"
|
pygmentsstyle = "monokai"
|
||||||
pygmentscodefences = true
|
pygmentscodefences = true
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="home">
|
<div class="home">
|
||||||
<div class="recipes xs-px1 xs-mt2">
|
<div class="recipes xs-px1 xs-mt2">
|
||||||
<div class="clearfix">
|
<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">
|
<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 }}">
|
<a class="block relative bg-blue" href="{{ .RelPermalink }}">
|
||||||
{{ if .Params.Image }}
|
{{ if .Params.Image }}
|
||||||
|
@ -17,4 +17,5 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ partial "pagination.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{{ if ne $paginator.PageNumber 1 }}
|
{{ if ne $paginator.PageNumber 1 }}
|
||||||
<li><a href="{{ $paginator.First.URL }}">«</a></li>
|
<li><a href="{{ $paginator.First.URL }}">«</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<li class="hidden"><a href="{{ $paginator.Prev.URL }}">‹</a></li>
|
<li><a href="{{ $paginator.Prev.URL }}">‹</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range $paginator.Pagers }}
|
{{ range $paginator.Pagers }}
|
||||||
{{ $.Scratch.Set "page_number_flag" false }}
|
{{ $.Scratch.Set "page_number_flag" false }}
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $paginator.HasNext }}
|
{{ 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 }}
|
{{ if ne $paginator.PageNumber $paginator.TotalPages }}
|
||||||
<li><a href="{{ $paginator.Last.URL }}">»</a></li>
|
<li><a href="{{ $paginator.Last.URL }}">»</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue