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/archives.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/archives.html')
-rw-r--r-- | layouts/_default/archives.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index e3ee3e5..348e6ac 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -1,8 +1,9 @@ {{ define "main" }} -<div id="page-tag"> +<!-- page info section e.g. current tag & total archive pages --> +<div id="page-info"> <span>{{ i18n "archivesTotalPages" }}{{ len (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}</span> </div> -<!-- archives range in posts --> +<!-- archives range in all posts --> {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) 50 }} {{ range $paginator.Pages }} <div id="post-archive"> @@ -14,7 +15,8 @@ </div> </div> {{ end }} -<!-- custom smart pagination --> + +<!-- START custom smart pagination --> {{ $offsetLinks := 2 }} {{ $maxLinks := (add (mul $offsetLinks 2) 1) }} {{ $lowerLimit := (add $offsetLinks 1) }} @@ -31,7 +33,6 @@ <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 }} @@ -57,7 +58,6 @@ </li> {{ end }} {{ end }} - {{ if $paginator.HasNext }} <li class="pag-next"> <a href="{{ $paginator.Next.URL }}"><i class="fas fa-angle-right"></i></a> @@ -70,5 +70,6 @@ {{ end }} </ul> {{ end }} +<!-- END custom smart pagination --> {{ end }}
\ No newline at end of file |