Renamed object instance to mark current page css class.
This commit is contained in:
parent
70f2137af5
commit
9f33b994dd
@ -1,3 +1,4 @@
|
||||
{% if is_paginated %}
|
||||
<div class="LP-Pagination">
|
||||
<ul class="LP-Pagination__List">
|
||||
{% if page_obj.has_previous %}
|
||||
@ -8,9 +9,13 @@
|
||||
<a href="?page={{ page_obj.previous_page_number }}" class="LP-Link"><span class="LP-Pagination__Previous">previous</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for page_obj in page_obj.paginator %}
|
||||
{% for i in page_obj.paginator %}
|
||||
{% if i.number == page_obj.number %}
|
||||
<li class="LP-Pagination__Item LP-Pagination__Item--number LP-Pagination__Item--current">
|
||||
{% else %}
|
||||
<li class="LP-Pagination__Item LP-Pagination__Item--number">
|
||||
<a href="?page={{page_obj.number}}" class="LP-Link"><span class="LP-Pagination__Number">{{page_obj.number}}</span></a>
|
||||
{% endif %}
|
||||
<a href="?page={{i.number}}" class="LP-Link"><span class="LP-Pagination__Number">{{i.number}}</span></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% if page_obj.has_next %}
|
||||
@ -23,3 +28,4 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user