{% extends 'base.html'%}
{% load static %}
{% load i18n %}
{% block content %}

<div class="container mb-3 mt-5">
  <div class="row row-cols-3 g-4 mt-3">
      {% for item in items %}
          <div class="col-md-4">
              {% include 'store/partials/product_card.html' %}
          </div>
      {% endfor %}
  </div>
</div>

<nav aria-label="Page navigation example">
    <ul class="pagination justify-content-center">
      <li class="page-item {% if not page.has_previous %} disabled {% endif %}">
        <a class="page-link" href="?page={{page.number|add:-1}}" tabindex="-1" {% if not page.has_previous %}aria-disabled="true"{% endif %}>Poprzedni</a>
      </li>
      {% for pg in page.paginator.get_elided_page_range %}
        <li class="page-item {% if pg == page.number %}active{% endif %}"><a class="page-link" href="?page={{pg}}">{{pg}}</a></li>
      {% endfor %}
      <li class="page-item {% if not page.has_next %} disabled {% endif %}">
        <a class="page-link" {% if not page.has_next %}aria-disabled="true"{% endif %} href="?page={{page.number|add:1}}">Następny</a>
      </li>
    </ul>
  </nav>

{% endblock %}
