News and author pages: listPosts per page, with pager
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{{/* page links for a paginator; nothing when there is a single page */}}
|
||||
{{ if gt .TotalPages 1 }}
|
||||
<nav class="pager" aria-label="Pages" data-pagefind-ignore>
|
||||
{{ if .HasPrev }}<a href="{{ .Prev.URL }}" rel="prev">← Newer</a>{{ end }}
|
||||
{{ $current := .PageNumber }}
|
||||
{{ range .Pagers }}
|
||||
{{ if eq .PageNumber $current }}<span class="current" aria-current="page">{{ .PageNumber }}</span>
|
||||
{{ else }}<a href="{{ .URL }}">{{ .PageNumber }}</a>{{ end }}
|
||||
{{ end }}
|
||||
{{ if .HasNext }}<a href="{{ .Next.URL }}" rel="next">Older →</a>{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user