Fixes margins on paginator to be more consistent with rest of site.
This commit is contained in:
parent
659ce7c879
commit
ed1f9f0570
1 changed files with 25 additions and 27 deletions
|
|
@ -1,32 +1,30 @@
|
||||||
{% if page_obj %}
|
{% if page_obj %}
|
||||||
<div class="container main-content mt-2" id="pagination">
|
<div class="row">
|
||||||
<div class="row">
|
<div class="col">
|
||||||
<div class="col">
|
<div class="card mt-3">
|
||||||
<div class="card mt-3">
|
<div class="card-body">
|
||||||
<div class="card-body">
|
<!-- Pagination -->
|
||||||
<!-- Pagination -->
|
<ul class="pagination justify-content-center mb-0">
|
||||||
<ul class="pagination justify-content-center mb-0">
|
<li class="page-item {% if page_obj.has_previous %}{% else %}disabled{% endif %}">
|
||||||
<li class="page-item {% if page_obj.has_previous %}{% else %}disabled{% endif %}">
|
<a class="page-link" href="{% if page_obj.has_previous %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.previous_page_number }}{% endif %}" aria-label="Previous">
|
||||||
<a class="page-link" href="{% if page_obj.has_previous %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.previous_page_number }}{% endif %}" aria-label="Previous">
|
<span aria-hidden="true">«</span>
|
||||||
<span aria-hidden="true">«</span>
|
<span class="sr-only">Previous</span>
|
||||||
<span class="sr-only">Previous</span>
|
</a>
|
||||||
</a>
|
</li>
|
||||||
</li>
|
|
||||||
|
{% for l in page_obj.paginator.page_range %}
|
||||||
|
{% if l <= page_obj.number|add:5 and l >= page_obj.number|add:-5 %}
|
||||||
|
<li class="page-item {% if forloop.counter == page_obj.number %}active{% endif %}"><a class="page-link" href="?{% if q %}q={{ q }}&{% endif %}page={{ forloop.counter }}">{{ forloop.counter }}</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{% for l in page_obj.paginator.page_range %}
|
<li class="page-item {% if page_obj.has_next %}{% else %}disabled{% endif %}">
|
||||||
{% if l <= page_obj.number|add:5 and l >= page_obj.number|add:-5 %}
|
<a class="page-link" href="{% if page_obj.has_next %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.next_page_number }}{% endif %}" aria-label="Next">
|
||||||
<li class="page-item {% if forloop.counter == page_obj.number %}active{% endif %}"><a class="page-link" href="?{% if q %}q={{ q }}&{% endif %}page={{ forloop.counter }}">{{ forloop.counter }}</a></li>
|
<span aria-hidden="true">»</span>
|
||||||
{% endif %}
|
<span class="sr-only">Next</span>
|
||||||
{% endfor %}
|
</a>
|
||||||
|
</li>
|
||||||
<li class="page-item {% if page_obj.has_next %}{% else %}disabled{% endif %}">
|
</ul>
|
||||||
<a class="page-link" href="{% if page_obj.has_next %}?{% if q %}q={{ q }}&{% endif %}page={{ page_obj.next_page_number }}{% endif %}" aria-label="Next">
|
|
||||||
<span aria-hidden="true">»</span>
|
|
||||||
<span class="sr-only">Next</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue