templates/front/front_page/bloc-image.html.twig line 1

Open in your IDE?
  1. {% set type = bloc.bloc_type_texte_image|default(0) %}
  2. {% set adLiip = "" %}
  3. {% if type == 0 %}
  4.     {% set adLiip = "_0" %}
  5. {% endif %}
  6. {% if medias[0].media_fichier is defined %}
  7.     {% set mediaTmp = medias[0].media_fichier %}
  8.     {% else %}
  9.     {% set mediaTmp = "" %}
  10. {% endif %}
  11. {% set mediaDefault = "default.jpg" %}
  12. {% set mediaTmp = webp(webpSupported, mediaTmp) %}
  13. {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  14. {% if type != 2 %}
  15.     <section data-bs-version="5.1"
  16.              class="image3 agencym4_image3 cid-sYtkRmM6mF {{ bloc.bloc_margin_top }} {{ bloc.bloc_margin_bottom }} type{{ type }}"
  17.              id="image3-33">
  18.         <div class="nuagesFondImage">
  19.             <div class="degraderBlancImageTop"></div>
  20.             <div class="degraderBlancImageBot"></div>
  21.         </div>
  22.         <figure class="mbr-figure container">
  23.             <a href="{{ asset('/medias_front/pages/' ~ mediaTmp) | imagine_filter('front_fancy') }}"
  24.                data-fancybox>
  25.                 <div class="image-block {% if type == 0 %}w-75{% elseif type == 1 %}w-100{% endif %}" {% if type == 0 %} style="background-image: url('{{ asset('/medias_front/pages/' ~ mediaTmp) | imagine_filter('front_blocImage'~adLiip) }}')" {% endif %}>
  26.                     {% if type != 0 %}
  27.                         <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  28.                              width="1400"
  29.                              alt=""
  30.                              loading="lazy" class="lazyload"
  31.                              data-src="{{ asset('/medias_front/pages/' ~ mediaTmp) | imagine_filter('front_blocImage'~adLiip) }}">
  32.                     {% endif %}
  33.                 </div>
  34.             </a>
  35.             <figcaption
  36.                     class="mbr-figure-caption mbr-figure-caption-over{% if (bloc.bloc_titre is null and bloc.bloc_sstitre is null) or (bloc.bloc_titre is empty and bloc.bloc_sstitre is empty) %} d-none{% endif %}">
  37.                 <div class="titleBloc container  mbr-white align-center mbr-fonts-style pt-3 display-1 ">
  38.                     {% if bloc.bloc_titre %}
  39.                         <h3 class="mbr-section-title mbr-fonts-style display-2">
  40.                             <strong>{{ bloc.bloc_titre }}</strong>
  41.                         </h3>
  42.                     {% endif %}
  43.                     {% if bloc.bloc_sstitre %}
  44.                         <h4 class="flechebash4 mbr-section-subtitle mbr-fonts-style display-5">
  45.                             {{ bloc.bloc_sstitre }}
  46.                         </h4>
  47.                     {% endif %}
  48.                 </div>
  49.             </figcaption>
  50.         </figure>
  51.     </section>
  52. {% endif %}
  53. {% if type == 2 %}
  54.     <section data-bs-version="5.1" class="image1 woodm4_image1 cid-sYtkwjjoQl mbr-parallax-background" id="image01-31"
  55.              style="background-image: url('{{ asset('/medias_front/pages/' ~ mediaTmp) | imagine_filter('front_blocImage'~adLiip) }}')">
  56.         <div class="container">
  57.         </div>
  58.     </section>
  59. {% endif %}