{% extends 'base_frontend.html.twig' %}

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

{% block content %}
   <div class="body-content outer-top-vs" id="top-banner-and-menu">

        <div class="row outer-bottom-xs"> 

            {% include 'frontend/home/include/categorie.html.twig' %}

            {% include 'frontend/home/include/homebanner.html.twig' %}
        </div>

        {% for show in shows %}
           
            <div class="wide-banners outer-bottom-vs">

                {% if show['largeur'][0] == 4 %}
                    {% set promo = show['promos'][0] %}
                    <div class="row">
                        <div class="col-md-12 col-sm-12">
                            {% include 'frontend/home/include/blocUniquePromo.html.twig' %}
                        </div>
                    </div>
                {% elseif show['largeur'][0] == 3 %}
                    <div class="row">
                        {% for key, promo in show.promos %}
                            {% if (show['largeur'][0] == 3) and (key == 0) %}
                                <div class="col-md-9 col-sm-9">
                                    {% include 'frontend/home/include/blocUniquePromo.html.twig' %}
                                </div>
                            {% else %}
                                <div class="col-md-3 col-sm-3">
                                    {% include 'frontend/home/include/blocUniquePromo.html.twig' %}
                                </div>
                            {% endif %} 
                        {% endfor %}
                    </div>
                {% elseif show['largeur'][0] == 2 %}
                    <div class="row">
                        {% for key, promo in show.promos %}
                            {% if (show['largeur'][0] == 2) and (key == 0) %}
                                <div class="col-md-6 col-sm-6">
                                    {% include 'frontend/home/include/blocUniquePromo.html.twig' %}
                                </div>
                            {% else %}
                                {% if (show['largeur'][0] == 2) and (show['largeur'][key] == 1) %}
                                    <div class="col-md-3 col-sm-3">
                                        {% include 'frontend/home/include/blocUniquePromo.html.twig' %}
                                    </div>
                                {% else %}
                                    <div class="col-md-6 col-sm-6">
                                        {% include 'frontend/home/include/blocUniquePromo.html.twig' %}
                                    </div>
                                {% endif %}
                            {% endif %}
                        {% endfor %}
                    </div>
                {% elseif show['largeur'][0] == 1 %}
                    <div class="row">
                        {% for key, promo in show.promos %}
                            <div class="col-md-3 col-sm-3">
                                {% include 'frontend/home/include/blocUniquePromo.html.twig' %}
                            </div>
                        {% endfor %}
                    </div>
                {% endif %}
            </div>

        {% endfor %}
       
    </div>

{% endblock %}

