arrowcounter/counter/templates/pagination.html

47 lines
1.3 KiB
HTML

<ul class="center pagination">
<li class="{% if page >= 2 %}waves-effect{% else %}disabled{% endif %}">
<a class="item"
href="{% if page >= 2 %}?page={{ page|add:'-1' }}{% else %}#{% endif %}">
<i class="material-icons">chevron_left</i>
</a>
</li>
{% if page >= 3 %}
<li class="waves-effect">
<a class="item" href="?page={{ page|add:'-2' }}">
{{ page|add:"-2" }}
</a>
</li>
{% endif %}
{% if page >= 2 %}
<li class="waves-effect">
<a class="item" href="?page={{ page|add:'-1' }}">
{{ page|add:"-1" }}
</a>
</li>
{% endif %}
<li class="active">
<a class="active item" href="#">
{{ page }}
</a>
</li>
{% if pageCount >= page|add:"1" %}
<li class="waves-effect">
<a class="item" href="?page={{ page|add:'1' }}">
{{ page|add:"1" }}
</a>
</li>
{% endif %}
{% if pageCount >= page|add:"2" %}
<li class="waves-effect">
<a class="item" href="?page={{ page|add:'2' }}">
{{ page|add:"2" }}
</a>
</li>
{% endif %}
<li class="{% if pageCount >= page|add:'1' %}waves-effect{% else %}disabled{% endif %}">
<a class="item"
href="{% if pageCount >= page|add:'1' %}?page={{ page|add:'1' }}{% else %}#{% endif %}">
<i class="material-icons">chevron_right</i>
</a>
</li>
</ul>