themu/layouts/partials/paginator.html

20 lines
901 B
HTML
Raw Normal View History

2020-04-08 21:44:29 +03:00
{{ $pag := $.Paginator }}
{{ if gt $pag.TotalPages 1 }}
<ul class="pagination">
<span class="page-item page-prev">
{{ if $pag.HasPrev }}
<a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Назад</span></a>
2023-07-29 17:04:05 +03:00
{{ else }}
<a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }} class="page-link" aria-label="Next"><span aria-hidden="true">Вперёд →</span></a>
2020-04-08 21:44:29 +03:00
{{ end }}
</span>
<span class="page-item page-next">
{{ if $pag.HasNext }}
<a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }} class="page-link" aria-label="Next"><span aria-hidden="true">Вперёд →</span></a>
2023-07-29 17:04:05 +03:00
{{ else }}
<a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Назад</span></a>
2020-04-08 21:44:29 +03:00
{{ end }}
</span>
</ul>
{{ end }}