FossilRepo

fossilrepo / templates / includes / _pagination.html
Source Blame History 29 lines
c588255… ragelink 1 {% if page_obj.has_other_pages or per_page_options %}
c588255… ragelink 2 <nav class="flex items-center justify-between border-t border-gray-700 px-2 py-3 mt-4">
c588255… ragelink 3 <div class="flex items-center gap-4">
c588255… ragelink 4 <span class="text-xs text-gray-500">
c588255… ragelink 5 Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}
c588255… ragelink 6 ({{ page_obj.paginator.count }} total)
c588255… ragelink 7 </span>
c588255… ragelink 8 {% if per_page_options %}
c588255… ragelink 9 <div class="flex items-center gap-1 text-xs text-gray-500">
c588255… ragelink 10 <span>Show</span>
c588255… ragelink 11 {% for opt in per_page_options %}
c588255… ragelink 12 <a href="?per_page={{ opt }}{% if search %}&search={{ search|urlencode }}{% endif %}{% if extra_params %}{{ extra_params }}{% endif %}"
c588255… ragelink 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>
c588255… ragelink 14 {% endfor %}
c588255… ragelink 15 </div>
c588255… ragelink 16 {% endif %}
c588255… ragelink 17 </div>
c588255… ragelink 18 <div class="flex gap-1">
c588255… ragelink 19 {% if page_obj.has_previous %}
c588255… ragelink 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 %}"
2f13242… ragelink 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>
c588255… ragelink 22 {% endif %}
c588255… ragelink 23 {% if page_obj.has_next %}
c588255… ragelink 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 %}"
2f13242… ragelink 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>
c588255… ragelink 26 {% endif %}
c588255… ragelink 27 </div>
c588255… ragelink 28 </nav>
c588255… ragelink 29 {% endif %}

Keyboard Shortcuts

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