{% if bloc is defined and bloc is not empty %}
{% if bloc.type == 'template' %}
{% if bloc.template is defined %}
{{bloc.template|raw}}
{% endif %}
{% endif %}
{% if bloc.type == 'bloc-service' and bloc.data != null %}
{% if bloc.data.alias == "bloc_travaux" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_travaux.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% elseif bloc.data.alias == "bloc_raisons" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_raisons.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% elseif bloc.data.alias == "chiffres" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/chiffres.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% elseif bloc.data.alias == "Affichage des etape" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/etape.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% elseif bloc.data.alias == "affichage-court" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/court_affichage.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% elseif bloc.data.alias == "affichage_realisation" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/affichage_realisation.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% elseif bloc.data.alias == "affichage_atous" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/affichage_atous.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% elseif bloc.data.alias == "avantages" %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/chiffres.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% endif %}
{% endif %}
{% if bloc.type == 'bloc-partenaire' and bloc.data != null %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_partenaire.html.twig',{
bloc: bloc.data,
}, with_context = false)}}
{% endif %}
{% if bloc.type == 'titre' %}
{% if bloc.title is defined %}
<div class="text-widget text-widget-{{bloc.id}}">
{{bloc.title|raw}}
</div>
{% endif %}
{% endif %}
{% if bloc.type == 'text' %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_titre_text.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% endif %}
{% if bloc.type == 'text2' %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_image_text.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% endif %}
{% if bloc.type == 'form' %}
{% if bloc.form.identifier == 'form-footer' %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_footer.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% elseif bloc.form.identifier == 'form-contact' %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/contact_form.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% elseif bloc.form.identifier == 'form-devis' %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/devis_form.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% elseif bloc.form.identifier == 'form-faq' %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_faq.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% else %}
{{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form.html.twig',{
bloc: bloc,
}, with_context = false)}}
{% endif %}
{% endif %}
{% if bloc.type == 'slider' and bloc.images is not empty %}
<div id="carouselDefaultIndicators" class="carousel slide slider-home" data-ride="carousel">
{% if bloc.images|length > 1 %}
<ol class="carousel-indicators">
{% for key,image in bloc.images %}
<li data-target="#carouselDefaultIndicators" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
{% endfor %}
</ol>
{% endif %}
</div>
{% endif %}
{% if bloc.type == 'video' %}
<section class="all-works espace-p-top text-center panel-st conducteur-trigger text-center">
<iframe width="962" height="541" src="{{bloc.url_video}}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</section>
{% endif %}
{% if bloc.type == 'image' %}
<section id="BlocImage" class="BlocImage" {% if bloc.bgimage is defined and bloc.bgimage != null %}style="background: url({{bloc.bgimage}}) no-repeat" {% endif %}>
<div class="container">
<div class="text-center">
<p>{{bloc.title}}</p>
</div>
</div>
</section>
{% endif %}
{% if bloc.type == 'carousel' %}
<div class="BlocCarousel">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-sm-12 col-md-6 col-lg-6">
{% if bloc.images is defined and bloc.images is not empty %}
<div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
{# <ol class="carousel-indicators">
{% for key,image in bloc.images %}
<li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
{% endfor %}
</ol> #}
<div class="carousel-inner text-center">
{% for key,file in bloc.images %}
<div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
{# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
<img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
</a> #}
<img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel img-fluid" alt="{{file.image}}">
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% if bloc.type == 'carousel2' %}
<div class="BlocCarousel">
<div class="container-fluid">
<div class="row">
{% set carousel2_g1 = bloc.gridcarousel != null? (12 - bloc.gridcarousel):'6' %}
{% set carousel2_g2 = bloc.gridcarousel != null? bloc.gridcarousel:'6' %}
<div class="col-sm-12 col-md-{{carousel2_g1}} col-lg-{{carousel2_g1}} {{bloc.position == 'left'?'order-2':'order-1'}}">
{{bloc.content|raw}}
</div>
<div class="col-sm-12 col-md-{{carousel2_g2}} col-lg-{{carousel2_g2}} {{bloc.position == 'left'?'order-1':'order-2'}}">
{% if bloc.images is defined and bloc.images is not empty %}
<div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
{# <ol class="carousel-indicators">
{% for key,image in bloc.images %}
<li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
{% endfor %}
</ol> #}
<div class="carousel-inner text-center">
{% for key,file in bloc.images %}
<div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
{# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
<img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
</a> #}
<img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel img-fluid" alt="{{file.image}}">
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}