diff options
author | amzrk2 | 2020-05-06 20:30:07 +0800 |
---|---|---|
committer | amzrk2 | 2020-05-06 20:30:07 +0800 |
commit | 41ef0bdcde0534402d430185052f4c553144487c (patch) | |
tree | 6e2142599e315395afbd71d09585d06c902683eb /layouts/_default/list.html | |
parent | 11639966566927a4616748c71c7c708a63d9d2b1 (diff) | |
download | hugo-theme-fuji-41ef0bdcde0534402d430185052f4c553144487c.tar.gz hugo-theme-fuji-41ef0bdcde0534402d430185052f4c553144487c.tar.bz2 hugo-theme-fuji-41ef0bdcde0534402d430185052f4c553144487c.zip |
General template fix
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r-- | layouts/_default/list.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e2a0eb7..7f387f6 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,5 @@ {{ define "main" }} -<!-- homepage range in posts --> +<!-- homepage range in all posts --> {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }} <div id="post"> @@ -17,7 +17,8 @@ </div> </div> {{ end }} -<!-- custom smart pagination --> + +<!-- START custom smart pagination --> {{ $offsetLinks := 2 }} {{ $maxLinks := (add (mul $offsetLinks 2) 1) }} {{ $lowerLimit := (add $offsetLinks 1) }} @@ -26,15 +27,14 @@ <ul id="pagination"> {{ if ne $paginator.PageNumber 1 }} <li class="pag-first"> - <a href="{{ $paginator.First.URL }}"><i class="fas fa-angle-double-left"></i></a> + <a href="{{ $paginator.First.URL }}"><i class="fas fa-angle-double-left"></a> </li> {{ end }} {{ if $paginator.HasPrev }} <li class="pag-previous"> - <a href="{{ $paginator.Prev.URL }}"><i class="fas fa-angle-left"></i></a> + <a href="{{ $paginator.Prev.URL }}"><i class="fas fa-angle-left"></a> </li> {{ end }} - {{ range $paginator.Pagers }} {{ $.Scratch.Set "pageNumFlag" false }} {{ if gt $paginator.TotalPages $maxLinks }} @@ -60,7 +60,6 @@ </li> {{ end }} {{ end }} - {{ if $paginator.HasNext }} <li class="pag-next"> <a href="{{ $paginator.Next.URL }}"><i class="fas fa-angle-right"></i></a> @@ -73,5 +72,6 @@ {{ end }} </ul> {{ end }} +<!-- END custom smart pagination --> {{ end }}
\ No newline at end of file |