templates/blocks/preview-content.html.twig line 1

Open in your IDE?
  1. {% if block.title is defined and block.title is not empty %}
  2.     <section class="preview-thematique mt-80px mb-80px apercu-bloc">
  3.         <div class="preview-thematique-header prelative br8 p-{% if block.title_position is defined and block.title_position is not empty %}{{ block.title_position }}{% endif %}">
  4.             <div class="magic-margin"></div>
  5.             <div class="preview-thematique-title shadow-standard w100 cwhite br8" {% if block.bg_color %} style="background: {{ block.bg_color }}" {% endif %}>
  6.                 {% if block.icon is defined and block.icon is not empty %}
  7.                     <svg class="{{ block.icon[0] }}" aria-hidden="true" focusable="false">
  8.                         <use xlink:href='#{{ block.icon[0] }}'/>
  9.                     </svg>
  10.                 {% endif %}
  11.                 <h2>{{ block.title }}</h2>
  12.                 {% if block.chapo is defined and block.chapo is not empty %}
  13.                     <p class="lh24">{{ block.chapo }}</p>
  14.                 {% endif %}
  15.             </div>
  16.             <div class="preview-thematique-image shadow-standard w100">
  17.                 {% if block.image is defined and block.image is not empty %}
  18.                     <img src="{{ block.image.formats['600x.webp'] }}" srcset="{{ block.image.formats['300x.webp'] }} 300w, {{ block.image.formats['600x.webp'] }} 600w, {{ block.image.formats['1000x.webp'] }} 1000w" sizes="646px" alt="{{ block.image | copyright_or_description_or_title }}" class="br8" loading="lazy" width="{{ block.image.fileVersion.properties.width }}" height="{{ block.image.fileVersion.properties.height }}">
  19.                 {% endif %}
  20.             </div>
  21.         </div>
  22.         {% if block.articles is defined and block.articles is not empty and block.articles|length > 0 %}
  23.             {% include "blocks/preview-content-logic.html.twig" with {articles: block.articles} %}
  24.         {% endif %}
  25.         {% if block.categories is defined and block.categories is not empty %}
  26.             {% include "blocks/preview-thematiques-logic.html.twig" with {categories: block.categories} %}
  27.         {% endif %}
  28.         {% if block.link is defined and block.link is not empty %}
  29.             <div class="tac">
  30.                 <a href="{{ block.link }}" class="CTA diblock nodeco lh28 mt-40px ma w100"><img src="/resources/img/plus-icon.svg" alt="Lien" class="mr-8px" loading="lazy" width="15" height="14">{{ block.link_text }}</a>
  31.             </div>
  32.         {% endif %}
  33.         <hr class="bold">
  34.     </section>
  35. {% endif %}