 .PageNumber 3) (eq $right 0) -}}
  {{- $showNumber := or $showNumber (le .TotalPages 5) -}}{{/* Issue #7523 */}}
  {{- $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2))) -}}
  {{- if $showNumber -}}
    {{- $ellipsed = false -}}
    {{- $shouldEllipse = false -}}
  {{- else -}}
    {{- $shouldEllipse = not $ellipsed -}}
    {{- $ellipsed = true -}}
  {{- end -}}
  {{- if $showNumber }}

    <a class="paper-btn{{ if eq . $pag }} active{{ end