templates/front/front_page/gallery/gallery-row-1-2-3.html.twig line 1

Open in your IDE?
  1. {% if type == 2 %}
  2.     {% set size = 3 %}
  3. {% else %}
  4.     {% set size = 4 %}
  5. {% endif %}
  6. {% set myVal = 1 %}
  7. {% set id = uniqId %}
  8. {% set id2 = uniqId %}
  9. <section data-bs-version="5.1"
  10.          class="gallery4 mbr-gallery cid-sYVVjIYuli {{ bloc.bloc_margin_top }} {{ bloc.bloc_margin_bottom }}"
  11.          id="gallery4-47">
  12.     <div class="container ">
  13.         <div class="mbr-section-head">
  14.             {% if bloc.bloc_titre %}
  15.                 <h3 class="mbr-section-title mbr-fonts-style align-center display-2">
  16.                     <strong>{{ bloc.bloc_titre }}</strong>
  17.                 </h3>
  18.             {% endif %}
  19.             {% if bloc.bloc_sstitre %}
  20.                 <h4 class="flechebash4 mbr-section-subtitle mbr-fonts-style align-center display-5">
  21.                     {{ bloc.bloc_sstitre }}
  22.                 </h4>
  23.             {% endif %}
  24.         </div>
  25.         <div class="row mbr-gallery justify-content-center galerieA100">
  26.             {% for media in medias %}
  27.                 {% set myVal = myVal + 1 %}
  28.                 {% set mediaTmp = media.media_fichier %}
  29.                 {% set mediaDefault = "default.jpg" %}
  30.                 {% set mediaTmp = webp(webpSupported, mediaTmp)|url_encode %}
  31.                 {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  32.                 {% set id = uniqId %}
  33.                 <div class="col-12 col-md-6 col-lg-{{ size }} item gallery-image {% if loop.first %}active{% endif %}">
  34.                     <div class="item-wrapper marge100img" data-toggle="modal" data-bs-toggle="modal"
  35.                          data-target="#sYVZf768Dd-modal-{{ id }}"
  36.                          data-bs-target="#sYVZf768Dd-modal-{{ id }}">
  37.                         <figure>
  38.                             <img class="w-100 lazyload"
  39.                                  src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  40.                                  alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  41.                                  data-slide-to="{{ loop.index0 }}" data-bs-slide-to="{{ loop.index0 }}"
  42.                                  data-target="#lb-sYVZf768Dd{{ id2 }}"
  43.                                  data-bs-target="#lb-sYVZf768Dd{{ id2 }}" loading="lazy"
  44.                                  data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~type) }}">
  45.                             <div class="icon-wrapper">
  46.                                 <span class="mobi-mbri mobi-mbri-search mbr-iconfont mbr-iconfont-btn"></span>
  47.                             </div>
  48.                             {% if (media.media_alt != '' or media.media_alt != null)  and media.media_alt_display == 1 %}
  49.                                 <figcaption class="text-left text-justify p-3">
  50.                                     {{ media.media_alt }}
  51.                                 </figcaption>
  52.                             {% endif %}
  53.                         </figure>
  54.                     </div>
  55.                 </div>
  56.             {% endfor %}
  57.         </div>
  58.         <div class="modal mbr-slider" tabindex="-1" role="dialog" aria-hidden="true" id="sYVZf768Dd-modal-{{ id }}">
  59.             <div class="modal-dialog" role="document">
  60.                 <div class="modal-content">
  61.                     <div class="modal-body">
  62.                         <div class="carousel slide carousel-fade" id="lb-sYVZf768Dd{{ id2 }}" data-ride="carousel"
  63.                              data-bs-ride="carousel" data-interval="5000" data-bs-interval="5000">
  64.                             <div class="carousel-inner">
  65.                                 {% for media in medias %}
  66.                                     {% set mediaTmp = media.media_fichier %}
  67.                                     {% set mediaDefault = "default.jpg" %}
  68.                                     {% set mediaTmp = webp(webpSupported, mediaTmp)|url_encode %}
  69.                                     {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  70.                                     <div class="carousel-item {% if loop.first %}active{% endif %}">
  71.                                         <img class="d-block w-100 lazyload"
  72.                                              src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  73.                                              alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  74.                                              loading="lazy"
  75.                                              data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_fancy') }}">
  76.                                     </div>
  77.                                 {% endfor %}
  78.                             </div>
  79.                             <ol class="carousel-indicators">
  80.                                 {% for media in medias %}
  81.                                     <li data-slide-to="{{ loop.index0 }}" data-bs-slide-to="{{ loop.index0 }}"
  82.                                         {% if loop.first %}class="active"{% endif %} data-target="#lb-sYVZf768Dd"
  83.                                         data-bs-target="#lb-sYVZf768Dd"></li>
  84.                                 {% endfor %}
  85.                             </ol>
  86.                             <a role="button" href="" class="close" data-dismiss="modal" data-bs-dismiss="modal"
  87.                                aria-label="Close">
  88.                             </a>
  89.                             <a class="carousel-control-prev carousel-control" role="button" data-slide="prev"
  90.                                data-bs-slide="prev" href="#lb-sYVZf768Dd{{ id2 }}">
  91.                                 <span class="mobi-mbri mobi-mbri-arrow-prev" aria-hidden="true"></span>
  92.                                 <span class="sr-only visually-hidden">Previous</span>
  93.                             </a>
  94.                             <a class="carousel-control-next carousel-control" role="button" data-slide="next"
  95.                                data-bs-slide="next" href="#lb-sYVZf768Dd{{ id2 }}">
  96.                                 <span class="mobi-mbri mobi-mbri-arrow-next" aria-hidden="true"></span>
  97.                                 <span class="sr-only visually-hidden">Next</span>
  98.                             </a>
  99.                         </div>
  100.                     </div>
  101.                 </div>
  102.             </div>
  103.         </div>
  104.     </div>
  105. </section>