Files
谢宇宁andClaude Opus 5.5 0fbdba5ccf Initial commit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 11:47:47 +07:00

42 lines
1.8 KiB
HTML

{{define "pagination"}}
<link rel="stylesheet" href="/static/css/pagination.css">
{{with .pagination}}
{{if .Visible}}
<nav class="pagination" aria-label="分页">
{{if .HasPrev}}
<a class="pagination__btn pagination__btn--prev" href="{{.PrevURL}}" {{externalLinkAttrs .PrevURL}} aria-label="上一页">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">上一页</span>
</a>
{{else}}
<span class="pagination__btn pagination__btn--prev is-disabled" aria-disabled="true">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">上一页</span>
</span>
{{end}}
{{range .Items}}
{{if .Dots}}
<span class="pagination__ellipsis" aria-hidden="true">{{.Label}}</span>
{{else}}
<a class="pagination__page{{if .Active}} is-active{{end}}" href="{{.URL}}" {{externalLinkAttrs .URL}}>{{.Label}}</a>
{{end}}
{{end}}
{{if .HasNext}}
<a class="pagination__btn" href="{{.NextURL}}" {{externalLinkAttrs .NextURL}} aria-label="下一页">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">下一页</span>
</a>
{{else}}
<span class="pagination__btn is-disabled" aria-disabled="true">
<img decoding="async" loading="lazy" class="icon" src="/static/images/placeholder.png?v=2" data-src="/static/images/chevron-right.svg" alt="">
<span class="visually-hidden">下一页</span>
</span>
{{end}}
{{if .TotalText}}
<span class="pagination__total">{{.TotalText}}</span>
{{end}}
</nav>
{{end}}
{{end}}
{{end}}