{% extends 'partials/base.html.twig' %}
{% set collection = page.collection() %}
{% set image = page.media.images|first %}

{% block body %}
  <section id="body" class="start">

    <section class="header-wrapper">
      {% include 'components/hero/bandeau.html.twig' %}
    </section>

    <section class="body-wrapper">
      <div class="content">
        {% for module in page.collection() %}

          {% if module.template == 'modular/section-packs' %}
            <div class="section nos_pack">
              <div class="__intro">
                {{module.content}}
              </div>

              <div class="packs d-flex">
                {% include 'components/thumbnails/thumbnails.html.twig' with {section: 'pack'} %}
              </div>

            </div>
          {% endif %}

          {% if module.template == 'modular/section-lieux' %}
            <div class="section nos_lieux">
              <div class="__intro">
                {{module.content}}
              </div>

              <div class="lieux d-flex">
              {% include 'components/thumbnails/thumbnails.html.twig' with {section: 'lieux'} %}
              </div>

              <div class="dl_brochure">
                {% set image_parts = pathinfo(page.header.btn_url) %}
                {% set image_basename_url = image_parts.basename %}
                {% set image_page_url = image_parts.dirname == '.' ? page : page.find(image_parts.dirname) %}

                <a target="_blank" href="{{ image_page_url.media[image_basename_url].url() }}" download>{{page.header.btn_txt}}</a>
              </div>

            </div>

          {% endif %}
        {% endfor %}

      </div>

    </section>
    <section class="bandeau_partenaires">
      <div class="logos_partenaires">
        <img src="/user/themes/lecampus/images/Logos_LEADER_VD_HD/1-Logo_Val_de_Drome_quadri_2.jpg" alt="">
        <img src="/user/themes/lecampus/images/Logos_LEADER_VD_HD/2-Logo_3CPS.jpg" alt="">
        <img src="/user/themes/lecampus/images/Logos_LEADER_VD_HD/3-Drapeau-Europe-Feader-Quadri.jpg" alt="">
        <img src="/user/themes/lecampus/images/Logos_LEADER_VD_HD/4-Logo_LEADER.jpg" alt="">
        <img src="/user/themes/lecampus/images/Logos_LEADER_VD_HD/5-Logo-EERARA-FEADER-2017-Quadri-jpg-473-Ko-nouveau-logo.jpg" alt="">
      </div>
    </section>
  </section>
{% endblock %}


{% block newsletter %}
  {% include 'partials/newsletters.html.twig' %}
{% endblock %}

{% block devis %}
  {% include 'partials/devis.html.twig' %}
{% endblock %}
