Files
tsuki/layouts/_partials/pagination.html
T
tiennm99 c30268759f feat: posts, taxonomies, archive (Phase 5)
- post/list.html paginated section list with post-card
- pagination.html partial (renders only when >1 page)
- _default/taxonomy.html for term lists (/tags/, /categories/) with counts
- taxonomy/term.html for single term pages (paginated posts)
- archives/list.html + archive-group.html: year/month grouped flat list
- exampleSite: 4 new posts across 2025-2026, 2 categories, 4 tags, archive index

Modern Hugo 0.146+ template naming: term.html resolved via taxonomy/
path (Hugo 0.154 lookup ignores _default/term.html).
2026-05-07 21:10:28 +07:00

27 lines
957 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{- $p := .Paginator -}}
{{- if gt $p.TotalPages 1 -}}
<nav class="pagination" aria-label="Pagination">
{{- if $p.HasPrev }}
<a class="pagination-prev" rel="prev" href="{{ $p.Prev.URL }}"> {{ i18n "prev" | default "Trước" }}</a>
{{- else }}
<span class="pagination-prev disabled" aria-disabled="true"> {{ i18n "prev" | default "Trước" }}</span>
{{- end }}
<ol class="pagination-pages">
{{- range $p.Pagers }}
{{- if eq . $p }}
<li><span class="pagination-current" aria-current="page">{{ .PageNumber }}</span></li>
{{- else }}
<li><a href="{{ .URL }}">{{ .PageNumber }}</a></li>
{{- end }}
{{- end }}
</ol>
{{- if $p.HasNext }}
<a class="pagination-next" rel="next" href="{{ $p.Next.URL }}">{{ i18n "next" | default "Tiếp" }} </a>
{{- else }}
<span class="pagination-next disabled" aria-disabled="true">{{ i18n "next" | default "Tiếp" }} </span>
{{- end }}
</nav>
{{- end -}}