{% if is_paginated %} {% load i18n %}

<nav aria-label="Page pagination">
  <ul class="pagination">
    {% if page_obj.has_previous %}
    <li class="page-item">
      <a
        class="page-link"
        href="?page={{ page_obj.previous_page_number }}{{ getvars }}{{ hashtag }}"
        >&laquo;</a
      >
    </li>
    {% else %}
    <li class="page-item disabled">
      <a class="page-link" href="#" onclick="javascript: return false;"
        >&laquo;</a
      >
    </li>
    {% endif %} {% for page in pages %} {% if page %} {% ifequal page
    page_obj.number %}
    <li class="page-item active">
      <a class="page-link" href="#" onclick="javascript: return false;"
        >{{ page }}</a
      >
    </li>
    {% else %}
    <li class="page-item">
      <a class="page-link" href="?page={{ page }}{{ getvars }}{{ hashtag }}"
        >{{ page }}</a
      >
    </li>
    {% endifequal %} {% else %}
    <li class="page-item disabled">
      <a class="page-link" href="#" onclick="javascript: return false;">...</a>
    </li>
    {% endif %} {% endfor %} {% if page_obj.has_next %}
    <li class="page-item">
      <a
        class="page-link"
        href="?page={{ page_obj.next_page_number }}{{ getvars }}{{ hashtag }}"
        >&raquo;</a
      >
    </li>
    {% else %}
    <li class="page-item disabled">
      <a class="page-link" href="#" onclick="javascript: return false;"
        >&raquo;</a
      >
    </li>
    {% endif %}
  </ul>
  {% endif %}
</nav>
