{% extends "kfet/base_col_1.html" %}
{% load static %}
{% load kfet_tags %}

{% block title %}Accueil{% endblock %}
{% block header %}{% endblock %}

{% block extra_head %}
<link rel="stylesheet" type="text/css" href="{% static 'kfet/css/home.css' %}">
{% endblock %}

{% block main-size %}col-sm-10 col-sm-offset-1{% endblock %}

{% block main-content %}

<div class="content-right-block">
  <h2>Carte</h2>
  <div class="column-row">
    <div class="column-sm-1 column-md-2 column-lg-3">
      <div class="unbreakable carte-inverted">
        {% if pressions %}
        <h3>Pressions du moment</h3>
        <ul class="carte">
          {% for article in pressions %}
          <li class="carte-line">
            <div class="filler"></div>
            <span class="carte-label">{{ article.name }}</span>
            <span class="carte-ukf">{{ article.price | ukf:False}} UKF</span>
          </li>
          {% endfor %}
        </ul>
        {% endif %}
      </div><!-- endblock unbreakable -->
      {% for  article in articles %}
        {% ifchanged article.category %}
          {% if not forloop.first %}
          </ul>
      </div><!-- endblock unbreakable -->
          {% endif %}
      <div class="unbreakable">
      <h3>{{ article.category.name }}</h3>
        <ul class="carte">
      {% endifchanged %}
          <li class="carte-line">
            <div class="filler"></div>
            <span class="carte-label">{{ article.name }}</span>
            <span class="carte-ukf">{{ article.price | ukf:False}} UKF</span>
          </li>
      {% if forloop.last %}
        </ul>
      </div><!-- endblock unbreakable -->
      {% endif %}
      {% endfor %}
      </div>
  </div>
</div>

{% endblock %}

