- {% if page_obj.has_previous %}
- <a href="?page={{ page_obj.previous_page_number }}">‹‹ previous</a>
- {% else %}
- <span class="disabled">‹‹ previous</span>
- {% endif %}
- {% for page in pages %}
- {% if page %}
- {% ifequal page page_obj.number %}
- <span class="current">{{ page }}</span>
- {% else %}
- <a href="?page={{ page }}{% if q %}&q={{ q }}{% endif %}">{{ page }}</a>
- {% endifequal %}
- {% else %}
- ...
- {% endif %}
- {% endfor %}
- {% if page_obj.has_next %}
- <a href="?page={{ page_obj.next_page_number }}">next ››</a>
- {% else %}
- <span class="disabled">next ››</span>
- {% endif %}
+ {% if page_obj.has_previous %}<a href="?page={{ page_obj.previous_page_number }}" class="prev">‹‹ previous</a> {% else %}<span class="disabled prev">‹‹ previous</span> {% endif %}
+ {% for page in pages %}{% if page %}{% ifequal page page_obj.number %}<span class="current page">{{ page }}</span> {% else %}<a href="?page={{ page }}" class="page">{{ page }}</a> {% endifequal %}{% else %} ... {% endif %}{% endfor %}
+ {% if page_obj.has_next %}<a href="?page={{ page_obj.next_page_number }}" class="next">next ››</a>{% else %}<span class="disabled next">next ››</span>{% endif %}