mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-28 22:11:48 -05:00
parent
21dbfa1f11
commit
2fa851e650
2 changed files with 2 additions and 4 deletions
3
tpl/tplimpl/embedded/templates.autogen.go
generated
3
tpl/tplimpl/embedded/templates.autogen.go
generated
|
@ -260,8 +260,7 @@ if (!doNotTrack) {
|
||||||
{{- $shouldEllipse := false -}}
|
{{- $shouldEllipse := false -}}
|
||||||
{{- range $pag.Pagers -}}
|
{{- range $pag.Pagers -}}
|
||||||
{{- $right := sub .TotalPages .PageNumber -}}
|
{{- $right := sub .TotalPages .PageNumber -}}
|
||||||
{{- $showNumber := or (le .PageNumber 3) (eq $right 0) -}}
|
{{- $showNumber := or (eq .TotalPages 5) (le .PageNumber 3) (eq $right 0) -}}
|
||||||
{{- $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) -}}
|
|
||||||
{{- if $showNumber -}}
|
{{- if $showNumber -}}
|
||||||
{{- $ellipsed = false -}}
|
{{- $ellipsed = false -}}
|
||||||
{{- $shouldEllipse = false -}}
|
{{- $shouldEllipse = false -}}
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
{{- $shouldEllipse := false -}}
|
{{- $shouldEllipse := false -}}
|
||||||
{{- range $pag.Pagers -}}
|
{{- range $pag.Pagers -}}
|
||||||
{{- $right := sub .TotalPages .PageNumber -}}
|
{{- $right := sub .TotalPages .PageNumber -}}
|
||||||
{{- $showNumber := or (le .PageNumber 3) (eq $right 0) -}}
|
{{- $showNumber := or (eq .TotalPages 5) (le .PageNumber 3) (eq $right 0) -}}
|
||||||
{{- $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) -}}
|
|
||||||
{{- if $showNumber -}}
|
{{- if $showNumber -}}
|
||||||
{{- $ellipsed = false -}}
|
{{- $ellipsed = false -}}
|
||||||
{{- $shouldEllipse = false -}}
|
{{- $shouldEllipse = false -}}
|
||||||
|
|
Loading…
Reference in a new issue