templates/theme/default/modele-widget/article_block.html.twig line 1

Open in your IDE?
  1. {% set position_texte = ({ 0: "text-center", 1: "text-start", 2: "text-end" }[widget.positiontext]|default("text-center")) %}
  2. {% if resultats is defined and resultats is not empty %}
  3. <div id="widget-{{widget.id}}" class="widget-content py-4 {{position_texte}}" {% 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 %}>
  4. <div class="container-fluid content-wrapper">
  5. <div class="list-services {{position_texte}}">
  6. <div class="contenu-list">
  7. {% if parametre.actiftitre == true %}
  8. <div class="site-title" data-aos="fade-up" data-aos-easing="linear" data-aos-delay="50">{{parametre.titre}}</div>
  9. {% endif %}
  10. {% if widget.Title != "" %}
  11. <h2 class="title-2" data-aos="fade-up" data-aos-easing="linear" data-aos-delay="100">{{widget.Title|raw}}</h2>
  12. {% endif %}
  13. {% if widget.description is not empty %}
  14. <div class="text-bloc" data-aos="fade-up" data-aos-easing="linear" data-aos-delay="150">
  15. {{widget.description|raw}}
  16. </div>
  17. {% endif %}
  18. </div>
  19. {% set data_columns = { '0':'3','1': '3', '2': '1', '4': '1' }[widget.multiaffichage] %}
  20. {% set data_style = { '0':'compact','1': 'compact', '2': 'wide', '4': 'wide' }[widget.multiaffichage] %}
  21. {% if template is defined and template is not empty %}
  22. {{ include(template_from_string(template.twig)) }}
  23. {% endif %}
  24. </div>
  25. </div>
  26. {% if widget.typelien is not empty and widget.typelien != 1 and widget.buttonlabel is not empty %}
  27. {% if widget.typelien == 2 %}
  28. <div class="item-link {{position_texte}}">
  29. <button class="btn-theme" onclick="window.location.href = '{{resolveInternalSlugLink(widget.lieninterne)}}';" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</button>
  30. </div>
  31. {% elseif widget.typelien == 3 %}
  32. <div class="item-link {{position_texte}}">
  33. <button class="btn-theme" onclick="window.open('{{widget.lienexterne}}','_blank');" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</button>
  34. </div>
  35. {% elseif widget.typelien == 4 %}
  36. <div class="item-link {{position_texte}}">
  37. <a class="btn-theme" href="tel:{{widget.telephone}}" title="{{widget.buttonlabel}}">{{widget.buttonlabel}}</a>
  38. </div>
  39. {% endif %}
  40. {% endif %}
  41. </div>
  42. {% endif %}