miniflux/internal/template/templates/common/pagination.html

40 lines
1.9 KiB
HTML
Raw Normal View History

2017-11-20 06:10:04 +01:00
{{ define "pagination" }}
<div class="pagination">
2024-06-29 05:19:38 +02:00
<div class="pagination-backward">
<div class="pagination-first {{ if not .ShowFirst }}disabled{{end}}">
{{ if .ShowFirst }}
<a href="{{ .Route }}{{ if gt .FirstOffset 0 }}?offset={{ .FirstOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}{{ else }}{{ if .SearchQuery }}?q={{ .SearchQuery }}{{ end }}{{ end }}" data-page="first">{{ t "pagination.first" }}</a>
{{ else }}
{{ t "pagination.first" }}
{{ end }}
</div>
<div class="pagination-prev {{ if not .ShowPrev }}disabled{{end}}">
{{ if .ShowPrev }}
<a href="{{ .Route }}{{ if gt .PrevOffset 0 }}?offset={{ .PrevOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}{{ else }}{{ if .SearchQuery }}?q={{ .SearchQuery }}{{ end }}{{ end }}" data-page="previous" rel="prev">{{ t "pagination.previous" }}</a>
{{ else }}
{{ t "pagination.previous" }}
{{ end }}
</div>
2017-11-20 06:10:04 +01:00
</div>
2024-06-29 05:19:38 +02:00
<div class="pagination-forward">
<div class="pagination-next {{ if not .ShowNext }}disabled{{end}}">
{{ if .ShowNext }}
<a href="{{ .Route }}?offset={{ .NextOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}" data-page="next" rel="next">{{ t "pagination.next" }}</a>
{{ else }}
{{ t "pagination.next" }}
{{ end }}
</div>
<div class="pagination-last {{ if not .ShowLast }}disabled{{end}}">
{{ if .ShowLast }}
<a href="{{ .Route }}?offset={{ .LastOffset }}{{ if .SearchQuery }}&amp;q={{ .SearchQuery }}{{ end }}" data-page="last" >{{ t "pagination.last" }}</a>
{{ else }}
{{ t "pagination.last" }}
{{ end }}
</div>
2017-11-20 06:10:04 +01:00
</div>
</div>
{{ end }}