{{- $pager := .Paginator }}
{{- if gt $pager.TotalPages 1 }}
  <div class="pager" id="pager">
    {{- with $pager.Prev }}
      <a href="{{ .URL }}#pager"  class=" pager_item pager_prev"></a>
    {{- else }}
      <span class="pager_item pager_active pager_prev"></span>
    {{- end }}
    {{- range first 4 $pager.Pagers }}
      <a href="{{ .URL }}#pager" class="pager_item{{ if eq . $pager }} pager_active{{ end }}">{{ .PageNumber }}</a>
    {{- end }}
    {{- if $pager.Next -}}
      <a href="{{ .URL }}#pager" class="pager_item pager_next"></a>
    {{- else -}}
      <span class="pager_item pager_active pager_next"></span>
    {{- end }}
  </div>
{{- end }}
