mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Revert "Fix ellipsis display logic in pagination template"
This reverts commit 2fa851e650
.
This commit is contained in:
parent
12f6a1cdc0
commit
bffc4e12fe
2 changed files with 4 additions and 2 deletions
3
tpl/tplimpl/embedded/templates.autogen.go
generated
3
tpl/tplimpl/embedded/templates.autogen.go
generated
|
@ -260,7 +260,8 @@ if (!doNotTrack) {
|
||||||
{{- $shouldEllipse := false -}}
|
{{- $shouldEllipse := false -}}
|
||||||
{{- range $pag.Pagers -}}
|
{{- range $pag.Pagers -}}
|
||||||
{{- $right := sub .TotalPages .PageNumber -}}
|
{{- $right := sub .TotalPages .PageNumber -}}
|
||||||
{{- $showNumber := or (eq .TotalPages 5) (le .PageNumber 3) (eq $right 0) -}}
|
{{- $showNumber := or (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,7 +13,8 @@
|
||||||
{{- $shouldEllipse := false -}}
|
{{- $shouldEllipse := false -}}
|
||||||
{{- range $pag.Pagers -}}
|
{{- range $pag.Pagers -}}
|
||||||
{{- $right := sub .TotalPages .PageNumber -}}
|
{{- $right := sub .TotalPages .PageNumber -}}
|
||||||
{{- $showNumber := or (eq .TotalPages 5) (le .PageNumber 3) (eq $right 0) -}}
|
{{- $showNumber := or (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