Skip to content

Commit 8cebb92

Browse files
authored
Make pagination menu wrapping (#642)
Replaces #640
1 parent 118e650 commit 8cebb92

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

readthedocsext/theme/templates/includes/crud/pagination.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
{% load i18n %}
2-
31
{% if is_paginated %}
4-
<div class="ui pagination menu">
2+
<div class="ui pagination wrapping menu">
53

64
{% if page_obj.has_previous %}
7-
<a class="icon item" href="?page{{ page_suffix }}={{ page_obj.previous_page_number }}{{ getvars }}"><i class="fa-solid fa-arrow-left icon"></i></a>
5+
<a class="icon item"
6+
href="?page{{ page_suffix }}={{ page_obj.previous_page_number }}{{ getvars }}"><i class="fa-solid fa-arrow-left icon"></i></a>
87
{% else %}
98
<a class="disabled icon item"><i class="fa-solid fa-arrow-left icon"></i></a>
109
{% endif %}
@@ -16,7 +15,8 @@
1615
<div class="active item">{{ page }}</div>
1716
{% else %}
1817
{% if disable_link_for_first_page and page == 1 %}
19-
<a href="{{ request.path }}{% if getvars %}?{{ getvars|slice:"1:" }}{% endif %}" class="item">{{ page }}</a>
18+
<a href="{{ request.path }}{% if getvars %}?{{ getvars|slice:"1:" }}{% endif %}"
19+
class="item">{{ page }}</a>
2020
{% else %}
2121
<a href="?page{{ page_suffix }}={{ page }}{{ getvars }}" class="item">{{ page }}</a>
2222
{% endif %}
@@ -28,7 +28,8 @@
2828
{% endif %}
2929

3030
{% if page_obj.has_next %}
31-
<a class="icon item" href="?page{{ page_suffix }}={{ page_obj.next_page_number }}{{ getvars }}"><i class="fa-solid fa-arrow-right icon"></i></a>
31+
<a class="icon item"
32+
href="?page{{ page_suffix }}={{ page_obj.next_page_number }}{{ getvars }}"><i class="fa-solid fa-arrow-right icon"></i></a>
3233
{% else %}
3334
<a class="disabled icon item"><i class="fa-solid fa-arrow-right icon"></i></a>
3435
{% endif %}

0 commit comments

Comments
 (0)