mirror of
https://github.com/cuigh/swirl
synced 2025-01-01 00:32:09 +00:00
19 lines
793 B
Go
19 lines
793 B
Go
{{ block pager(info) }}
|
|
<nav class="pagination is-centered">
|
|
<a class="pagination-previous" {{ if info.Page > 1 }}href="{{ info.URL(info.Page-1) }}"{{ else }}disabled{{ end }}>{{ i18n("button.previous") }}</a>
|
|
<a class="pagination-next" {{ if info.Page < info.MaxPage }}href="{{ info.URL(info.Page+1) }}"{{ else }}disabled{{ end }}>{{ i18n("button.next") }}</a>
|
|
<ul class="pagination-list">
|
|
{{ range info.Pages }}
|
|
<li>
|
|
{{ if . == 0 }}
|
|
<span class="pagination-ellipsis">…</span>
|
|
{{ else if . == info.Page }}
|
|
<a class="pagination-link is-current">{{ . }}</a>
|
|
{{ else }}
|
|
<a href="{{info.URL(.)}}" class="pagination-link">{{ . }}</a>
|
|
{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</nav>
|
|
{{ end }} |