{% set parametre = ParametreSite() %}
{% set position_texte = "" %}
{% if widget.positiontext == 0 %}
{% set position_texte = "pos1" %}
{% elseif widget.positiontext == 1 %}
{% set position_texte = "pos2" %}
{% else %}
{% set position_texte = "pos3" %}
{% endif %}
{% set type_affiche = "" %}
{% if widget.nombrearticle == 0 %}
{% set type_affiche = "type_affiche1" %}
{% elseif widget.nombrearticle == 1 %}
{% set type_affiche = "type_affiche2" %}
{% else %}
{% set type_affiche = "type_affiche3" %}
{% endif %}
{% if widget.actif_slider == 1 %}
{% set type_affiche = type_affiche ~ " owl-carousel" %}
{% endif %}
{% if resultats is defined and resultats is not empty %}
<section id="widget-{{widget.id}}" class="sec-art py-4 text-center" {% if widget.bgimage is defined and widget.bgimage != null %}style="background: url({{asset_image(widget.bgimage)}}) " {% elseif widget.bgcolor != null %}style="background-color:{{widget.bgcolor}}"{% endif %}>
<div class="container-fluid">
<div class="list_blocs {{position_texte}}">
<div class="cnt_blocs">
{% if parametre.actiftitre == true %}
<div class="titre_site">{{parametre.titre}}</div>
{% endif %}
{% if widget.subTitle != "" %}
<div class="sub-title">{{widget.subTitle|raw}}</div>
{% endif %}
<div class="texte-content">{{widget.description|raw}}</div>
</div>
{% set duree = 0.1 %}
{% set multi_affichage = "affichage1" %}
{% if widget.multi_affichage == 1 %}
{% set multi_affichage = "affichage1" %}
{% elseif widget.multi_affichage == 2 %}
{% set multi_affichage = "affichage2" %}
{% elseif widget.multi_affichage == 3 %}
{% set multi_affichage = "affichage3" %}
{% elseif widget.multi_affichage == 4 %}
{% set multi_affichage = "affichage4" %}
{% elseif widget.multi_affichage == 5 %}
{% set multi_affichage = "affichage5" %}
{% elseif widget.multi_affichage == 6 %}
{% set multi_affichage = "affichage6" %}
{% elseif widget.multi_affichage == 7 %}
{% set multi_affichage = "affichage7" %}
{% elseif widget.multi_affichage == 8 %}
{% set multi_affichage = "affichage8" %}
{% elseif widget.multi_affichage == 9 %}
{% set multi_affichage = "affichage9" %}
{% elseif widget.multi_affichage == 10 %}
{% set multi_affichage = "affichage10" %}
{% elseif widget.multi_affichage == 11 %}
{% set multi_affichage = "affichage11" %}
{% elseif widget.multi_affichage == 12 %}
{% set multi_affichage = "affichage12" %}
{% endif %}
<section class="blocs">
{% if template is defined and template is not empty %}
{{ include(template_from_string(template.twig)) }}
{% endif %}
</section>
</div>
</div>
{% if widget.typelien is not empty and widget.typelien != 1 and widget.buttonlabel is not empty %}
{% if widget.typelien == 2 %}
<div class="container-fluid wrapper">
<div class="bouton-articles text-center my-3">
<button class="btn-back-pulse" onclick="window.location.href = '{{slug_link_interne(widget.lieninterne)}}';" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</button>
</div>
</div>
{% elseif widget.typelien == 3 %}
<div class="container-fluid wrapper">
<div class="bouton-articles text-center my-3">
<button class="btn-back-pulse" onclick="window.open('{{widget.lienexterne}}','_blank');" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</button>
</div>
</div>
{% elseif widget.typelien == 4 %}
<div class="container-fluid wrapper">
<div class="bouton-articles text-center my-3">
<a class="btn-back-pulse" href="tel:{{widget.telephone}}" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</a>
</div>
</div>
{% endif %}
{% endif %}
</section>
{% endif %}