mirror of
https://github.com/tiennm99/tsuki.git
synced 2026-09-02 14:21:19 +00:00
- 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).
27 lines
957 B
HTML
27 lines
957 B
HTML
{{- $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 -}}
|