{{- with .Paginator -}}
{{- if and .HasNext (not .HasPrev) -}}
I am the first page.
{{- end -}}
{{- if and .HasPrev (not .HasNext) -}}
I am the last page.
{{- end -}}
{{- if and .HasNext .HasPrev -}}
I am neither the first nor the last page.
{{- end -}}
{{- end -}}