Improve gallery pagination, add page numbers
This commit is contained in:
parent
3bfe4ec343
commit
6acbf97d1a
1 changed files with 12 additions and 2 deletions
|
@ -6,14 +6,24 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div style="text-align: center;">
|
||||
|
||||
{{ with $paginator.Prev }}
|
||||
<a href="{{ .URL }}">Prev</a>
|
||||
<a style="float: left" href="{{ .URL }}">Prev</a>
|
||||
{{ else }}
|
||||
<span style="float: left">Prev</span>
|
||||
{{ end }}
|
||||
|
||||
<span style="display: inline-block;">{{ printf "Page %d" $paginator.PageNumber }}</span>
|
||||
|
||||
{{ with $paginator.Next }}
|
||||
<a href="{{ .URL }}">Next</a>
|
||||
<a style="float: right" href="{{ .URL }}">Next</a>
|
||||
{{ else }}
|
||||
<span style="float: right">Next</span>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ $site := resources.Get "js/site.js" }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
|
||||
|
|
Loading…
Add table
Reference in a new issue