{% load i18n %}

<ul class="paginator">
  {% if page.num_pages == 1 %}
  <li class="paginator__pages">{% trans "Page 1 of 1" %}</li>
  {% else %}
  {% if page.number > 1 %}
    <li class="paginator__button"><a href="?{{ page_var }}={{ page.previous_page_number }}{{ extra_query }}{{ hashtag }}"><i class="fa fa-chevron-left"></i></a></li>
  {% endif %}
  {% for page_number in page.page_range %}
  {% if page_number == page.number %}
    <li class="paginator__button"><span>{{ page_number }}</span></li>
  {% else %}
    <li class="paginator__button"><a href="?{{ page_var }}={{ page_number }}{{ extra_query }}{{ hashtag }}">{{ page_number }}</a></li>
  {% endif %}

  {% endfor %}
  {% if page.number < page.num_pages %}
    <li class="paginator__button"><a href="?{{ page_var }}={{ page.next_page_number }}{{ extra_query }}{{ hashtag }}"><i class="fa fa-chevron-right"></i></a></li>
  {% endif %}
  {% endif %}
</ul>
