{% if is_paginated %}
{% load i18n %}
<div class="pagination">
    {% if page_obj.has_previous %}
        <a href="?page={{ page_obj.previous_page_number }}{{ getvars }}{{ hashtag }}" class="button search-pagination-button">&laquo; {% trans "Previous" %}</a>
    {% else %}
        <span class="button--disabled button search-pagination-button">&laquo; {% trans "Previous" %}</span>
    {% endif %}
    {% for page in pages %}
        {% if page %}
            {% ifequal page page_obj.number %}
                <span class="button current pagination__page-number">{{ page }}</span>
            {% else %}
                <a href="?page={{ page }}{{ getvars }}{{ hashtag }}" class="button pagination__page-number">{{ page }}</a>
            {% endifequal %}
        {% else %}
            ...
        {% endif %}
    {% endfor %}
    {% if page_obj.has_next %}
        <a href="?page={{ page_obj.next_page_number }}{{ getvars }}{{ hashtag }}" class="button search-pagination-button">{% trans "Next" %} &raquo;</a>
    {% else %}
        <span class="button--disabled button search-pagination-button">{% trans "Next" %} &raquo;</span>
    {% endif %}
</div>
{% endif %}
