Skip to content

Commit

Permalink
Remove redundant check for current page in pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Sep 10, 2024
1 parent 81685c8 commit bdbdd7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/includes/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

{# always display current page, marked as active #}
{% if number == page_obj.number %}
<a title="page {{number}}" class="pagination__item pagination__item--current" href="?{% url_replace 'page' number %}" {% if number == page_obj.number %}aria-current="page"{% endif %}>{{ number }}</a>
<a title="page {{number}}" class="pagination__item pagination__item--current" href="?{% url_replace 'page' number %}" aria-current="page">{{ number }}</a>

{# for current page 1 or 2, display first 5 #}
{% elif page_obj.number <= 2 and number <= 5 %}
Expand Down

0 comments on commit bdbdd7c

Please sign in to comment.