FossilRepo

fossilrepo / templates / includes / _pagination.html
1
{% if page_obj.has_other_pages or per_page_options %}
2
<nav class="flex items-center justify-between border-t border-gray-700 px-2 py-3 mt-4">
3
<div class="flex items-center gap-4">
4
<span class="text-xs text-gray-500">
5
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
6
({{ page_obj.paginator.count }} total)
7
</span>
8
{% if per_page_options %}
9
<div class="flex items-center gap-1 text-xs text-gray-500">
10
<span>Show</span>
11
{% for opt in per_page_options %}
12
<a href="?per_page={{ opt }}{% if search %}&search={{ search|urlencode }}{% endif %}{% if extra_params %}{{ extra_params }}{% endif %}"
13
class="px-2 py-0.5 rounded {% if per_page == opt %}bg-gray-700 text-gray-200{% else %}text-gray-500 hover:text-gray-300{% endif %}">{{ opt }}</a>
14
{% endfor %}
15
</div>
16
{% endif %}
17
</div>
18
<div class="flex gap-1">
19
{% if page_obj.has_previous %}
20
<a href="?page={{ page_obj.previous_page_number }}{% if per_page %}&per_page={{ per_page }}{% endif %}{% if search %}&search={{ search|urlencode }}{% endif %}{% if extra_params %}{{ extra_params }}{% endif %}"
21
class="px-3 py-1 text-xs rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700 border border-gray-700 transition-colors">Previous</a>
22
{% endif %}
23
{% if page_obj.has_next %}
24
<a href="?page={{ page_obj.next_page_number }}{% if per_page %}&per_page={{ per_page }}{% endif %}{% if search %}&search={{ search|urlencode }}{% endif %}{% if extra_params %}{{ extra_params }}{% endif %}"
25
class="px-3 py-1 text-xs rounded-md bg-gray-800 text-gray-300 hover:bg-gray-700 border border-gray-700 transition-colors">Next</a>
26
{% endif %}
27
</div>
28
</nav>
29
{% endif %}
30

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button