templates/front/front_news/bloc-texte_image.html.twig line 1

Open in your IDE?
  1. <section data-bs-version="5.1"
  2.          class="image2 cid-sYtiOZS3A3 text-img-type-{{ bloc.act_bloc_type_texte_image|default(0) }} {{ bloc.act_bloc_margin_top }} {{ bloc.act_bloc_margin_bottom }}"
  3.          id="image2-2t">
  4.     <div class="row {% if bloc.act_bloc_alignement == 'droite' %}row-reverse{% endif %} m-0">
  5.         {% if medias[0].act_media_fichier is defined %}
  6.             {% set mediaTmp = medias[0].act_media_fichier %}
  7.             {% set mediaDefault = "default.jpg" %}
  8.             {% set mediaTmp = webp(webpSupported, mediaTmp) %}
  9.             {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  10.             <div class="col-12 col-lg-6 p-0">
  11.                 <a {% if medias[0].act_media_lien %} href="{{ medias[0].act_media_lien }}" {% if medias[0].act_media_is_blank == 1 %} target="_blank" rel="noreferrer" {% endif %} {% else %} href="{{ asset('/medias_front/actualite/'~mediaTmp) | imagine_filter('front_fancy') }}" target="_blank"  {% endif %}
  12.                         title="{{ medias[0].act_media_alt|default(bloc.act_bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  13.                         style="background-image:url({{ asset('/medias_front/actualite/'~mediaTmp) | imagine_filter('front_blocTexteImage') }});">
  14.                     <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  15.                          loading="lazy" class="lazyload img-fit-cover"
  16.                          data-src="{{ asset('/medias_front/actualite/'~mediaTmp) | imagine_filter('front_blocTexteImage') }}"
  17.                          alt="{{ medias[0].act_media_alt|default(bloc.act_bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}">
  18.                 </a>
  19.             </div>
  20.         {% endif %}
  21.         <div class="col-12 col-lg-6 d-flex justify-content-center">
  22.             <div class="text-wrapper col-lg-10">
  23.                 {% if bloc.act_bloc_titre %}
  24.                     <h3 class="mbr-section-title mbr-fonts-style display-2 text-center">
  25.                         <strong>{{ bloc.act_bloc_titre }}</strong>
  26.                     </h3>
  27.                 {% endif %}
  28.                 {% if bloc.act_bloc_sstitre %}
  29.                     <h4 class="mbr-section-subtitle mbr-fonts-style display-5 text-center">
  30.                         {{ bloc.act_bloc_sstitre }}
  31.                     </h4>
  32.                 {% endif %}
  33.                 <div class="mbr-text mbr-fonts-style display-7 bloc-text">
  34.                     {{ bloc.act_bloc_texte|raw }}
  35.                 </div>
  36.             </div>
  37.         </div>
  38.     </div>
  39. </section>