{% set parametre = ParametreSite() %}
{% set position_texte = "" %}
{% if bloc.positiontext == 2 %}
{% set position_texte = "pos3" %}
{% elseif bloc.positiontext == 1 %}
{% set position_texte = "pos2" %}
{% else %}
{% set position_texte = "pos1" %}
{% endif %}
{% set type_affiche = "" %}
{% if bloc.nombrearticle == 1 %}
{% set type_affiche = "type_affiche1" %}
{% elseif bloc.nombrearticle == 2 %}
{% set type_affiche = "type_affiche2" %}
{% else %}
{% set type_affiche = "type_affiche3" %}
{% endif %}
{% if bloc.actif_slider == 1 %}
{% set type_affiche = type_affiche ~ " owl-carousel" %}
{% endif %}
<section class="all-services py-4" {% if bloc.bgimage %}style="background-image: url('{{asset(bloc.bgimage)}}');"{% endif %} >
{% if bloc.blocServiceItems %}
<div class="container-fluid">
<div class="list_blocs {{position_texte}}">
<div class="cnt_blocs">
{% if bloc.positiontext != 0 and bloc.positiontext != 1 %}
<div class="container-fluid wrapper">
{% endif %}
<h1 class="wow fadeInUp">{{bloc.title}}</h1>
{% if bloc.content is not empty %}<div>{{bloc.content|raw}}</div>{% endif %}
{% if bloc.typelien != 1 %}
{% if bloc.typelien == '4' %}
<div class="text-center py-2">
<a href="javascript:void(0)" onclick="window.location.href = 'tel:{{bloc.telephone}}';" class="btn btn-back-pulse">{{bloc.titrelien}}</a>
</div>
{% elseif bloc.typelien == '2' %}
<div class="text-center py-2">
<a href="{{bloc.lieninterne}}" class="btn btn-back-pulse">{{bloc.titrelien}}</a>
</div>
{% elseif bloc.typelien == '3' %}
<div class="text-center py-2">
<a href="{{bloc.lienexterne}}" class="btn btn-back-pulse">{{bloc.titrelien}}</a>
</div>
{% endif %}
{% endif %}
{% if bloc.positiontext != 0 and bloc.positiontext != 1 %}
</div>
{% endif %}
</div>
<div class="blocs">
<div class="results affichage3 {{type_affiche}}">
{% set duree = 0.3 %}
{% for key,item in bloc.blocServiceItems|filter(v => v.actif == true) %}
{% if item.typelien == 1 %}
{% set url = '#' %}
{% elseif item.typelien == 2 %}
{% set url = item.lieninterne %}
{% elseif item.typelien == 3 %}
{% set url = item.lienexterne %}
{% elseif item.typelien == 4 %}
{% set url = 'tel:+'~ item.telephone %}
{% endif %}
{% set image = item.image != ''? item.image:'/uploads/images/'~ parametre.imagevide %}
<div class="article wow fadeInDown animated" data-wow-delay="{{duree}}s">
<a class="absolute_link" href="{{url}}" title="{{item.title}}">
<span class="article-image">
<img alt="{{item.title}}" src="{{asset_image(image)}}" class="img-fluid">
</span>
<div class="article-cnt">
<h3 class="article-titre">{{item.title}}</h3>
</div>
</a>
</div>
{% set duree = duree + 0.2 %}
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
</section>