2022-11-30 16:18:23 +08:00
|
|
|
|
{{define "page"}}
|
|
|
|
|
<ul class="d-inline-flex mb-0 pagination pagination-sm">
|
2022-11-30 17:47:40 +08:00
|
|
|
|
{{ if ne .page.Currpage 1 }}
|
2022-11-30 16:18:23 +08:00
|
|
|
|
<li class="page-item">
|
2022-12-06 12:16:43 +08:00
|
|
|
|
<a class="page-link" href="?page={{$.page.Prevpage}}"><span aria-hidden="true">{{translator $.language "ui.pagination.prev"}}</span><span
|
|
|
|
|
class="visually-hidden">{{translator $.language "ui.pagination.prev"}}</span></a>
|
2022-11-30 16:18:23 +08:00
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ range $value := .page.Pages }}
|
2022-11-30 16:27:23 +08:00
|
|
|
|
{{ if eq $.page.Currpage $value }}
|
2022-11-30 16:18:23 +08:00
|
|
|
|
<li class="page-item active">
|
|
|
|
|
<span class="page-link" href="?page={{$value}}">{{$value}}
|
|
|
|
|
<span class="visually-hidden">(current)</span>
|
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<li class="page-item">
|
|
|
|
|
<a class="page-link" href="?page={{$value}}">{{$value}}</a>
|
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ end }}
|
2022-11-30 16:27:23 +08:00
|
|
|
|
{{ if lt $.page.Currpage $.page.Totalpages }}
|
2022-11-30 16:18:23 +08:00
|
|
|
|
<li class="page-item">
|
2022-12-06 12:16:43 +08:00
|
|
|
|
<a class="page-link" href="?page={{$.page.Nextpage}}"><span aria-hidden="true">{{translator $.language "ui.pagination.next"}}</span><span
|
|
|
|
|
class="visually-hidden">{{translator $.language "ui.pagination.next"}}</span></a>
|
2022-11-30 16:18:23 +08:00
|
|
|
|
</li>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</ul>
|
|
|
|
|
{{end}}
|
2022-11-30 17:47:40 +08:00
|
|
|
|
ㅤ
|