{% load static %}

<div class="sidebar">
  <h3 class="sidebar-title">Rechercher</h3>
  <div class="sidebar-item search-form">
    <form action="#" method="post">
      {% csrf_token %}
      <input type="text" name="recherche" placeholder="Rechercher..." required>
      <button type="submit"><i class="bi bi-search"></i></button>
    </form>
  </div><!-- End sidebar search formn-->

  <h3 class="sidebar-title">Categories</h3>
  <div class="sidebar-item categories">
    <ul>
      <li {% if not category %} class="active"{% endif %}><a href="#">Tout</a></li>
          {% for c in categories %}

            <li {% if category.slug == c.slug %} class="active"{% endif %}>
                <a href="#">{{ c.name }}</a>
            </li>
          {% endfor %}
    </ul>
  </div><!-- End sidebar categories-->

</div><!-- End sidebar -->