templates/front/front_page/gallery/gallery-popup-slider.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. <section data-bs-version="5.1"
  7.          class="gallery2 mbr-gallery cid-sYVVjIYuli {{ bloc.bloc_margin_top }} {{ bloc.bloc_margin_bottom }}"
  8.          id="gallery2-26">
  9.     <div class="nuagesFond"></div>
  10.     <div class="container galImg">
  11.         <div class="mbr-section-head">
  12.             {% if bloc.bloc_titre %}
  13.                 <h3 class="mbr-section-title mbr-fonts-style align-center display-2">
  14.                     <strong>{{ bloc.bloc_titre }}</strong>
  15.                 </h3>
  16.             {% endif %}
  17.             {% if bloc.bloc_sstitre %}
  18.                 <h4 class="flechebash4 mbr-section-subtitle mbr-fonts-style align-center display-5">
  19.                     {{ bloc.bloc_sstitre }}
  20.                 </h4>
  21.             {% endif %}
  22.         </div>
  23.         <div class="row mbr-gallery justify-content-center mt-4">
  24.             {% for media in medias %}
  25.                 {% set mediaTmp = media.media_fichier %}
  26.                 {% set mediaDefault = "default.jpg" %}
  27.                 {% set mediaTmp = webp(webpSupported, mediaTmp)|url_encode %}
  28.                 {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  29.                 {% set id = media.media_id %}
  30.                 <div class="w-65 col-12 col-md-6 col-lg-{{ size }} item gallery-image {% if loop.first %}active{% endif %}">
  31.                     <div class="item-wrapper" data-toggle="modal" data-bs-toggle="modal"
  32.                          data-target="#sYVZf768Dd-modal-{{ id }}"
  33.                          data-bs-target="#sYVZf768Dd-modal-{{ id }}">
  34.                         {% if (media.media_alt != '' or media.media_alt != null)  and media.media_alt_display == 1 %}
  35.                             <img class="w-100 lazyload h-80"
  36.                                  src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  37.                                  alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  38.                                  data-slide-to="{{ loop.index0 }}" data-bs-slide-to="{{ loop.index0 }}"
  39.                                  data-target="#lb-sYVZf768D{{ id }}"
  40.                                  data-bs-target="#lb-sYVZf768Dd{{ id }}" loading="lazy"
  41.                                  data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~1) }}">
  42.                             <div class="icon-wrapper">
  43.                                 <span class="mobi-mbri mobi-mbri-search mbr-iconfont mbr-iconfont-btn"></span>
  44.                             </div>
  45.                             <figcaption class="text-left text-justify p-3 textDesc">
  46.                                 {{ media.media_alt }}
  47.                             </figcaption>
  48.                         {% else %}
  49.                             <img class="w-100 lazyload"
  50.                                  src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  51.                                  alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  52.                                  data-slide-to="{{ loop.index0 }}" data-bs-slide-to="{{ loop.index0 }}"
  53.                                  data-target="#lb-sYVZf768Dd{{ id }}"
  54.                                  data-bs-target="#lb-sYVZf768Dd{{ id }}" loading="lazy"
  55.                                  data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~1) }}">
  56.                             <div class="icon-wrapper">
  57.                                 <span class="mobi-mbri mobi-mbri-search mbr-iconfont mbr-iconfont-btn"></span>
  58.                             </div>
  59.                         {% endif %}
  60.                     </div>
  61.                 </div>
  62.             {% endfor %}
  63.         </div>
  64.         {% for media in medias %}
  65.         {% set id = media.media_id %}
  66.         <div class="modal mbr-slider" tabindex="-1" role="dialog" aria-hidden="true" id="sYVZf768Dd-modal-{{ id }}">
  67.             <div class="modal-dialog" role="document">
  68.                 <div class="modal-content">
  69.                     <div class="modal-body">
  70.                         <div class="carousel slide carousel-fade" id="lb-sYVZf768Dd{{ id }}" data-ride="carousel"
  71.                              data-bs-ride="carousel" data-interval="5000" data-bs-interval="5000">
  72.                             <div class="carousel-inner">
  73.                                 {% for media in medias %}
  74.                                     {% set mediaTmp = media.media_fichier %}
  75.                                     {% set mediaDefault = "default.jpg" %}
  76.                                     {% set mediaTmp = webp(webpSupported, mediaTmp)|url_encode %}
  77.                                     {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  78.                                     <div class="carousel-item {% if loop.first %}active{% endif %}">
  79.                                         <img class="d-block w-100 lazyload"
  80.                                              src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  81.                                              alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  82.                                              loading="lazy"
  83.                                              data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_fancy') }}">
  84.                                     </div>
  85.                                 {% endfor %}
  86.                             </div>
  87.                             <ol class="carousel-indicators">
  88.                                 {% for media in medias %}
  89.                                     <li data-slide-to="{{ loop.index0 }}" data-bs-slide-to="{{ loop.index0 }}"
  90.                                         {% if loop.first %}class="active"{% endif %} data-target="#lb-sYVZf768Dd"
  91.                                         data-bs-target="#lb-sYVZf768Dd"></li>
  92.                                 {% endfor %}
  93.                             </ol>
  94.                             <a role="button" href="" class="close" data-dismiss="modal" data-bs-dismiss="modal"
  95.                                aria-label="Close">
  96.                             </a>
  97.                             <a class="carousel-control-prev carousel-control" role="button" data-slide="prev"
  98.                                data-bs-slide="prev" href="#lb-sYVZf768Dd{{ id }}">
  99.                                 <span class="mobi-mbri mobi-mbri-arrow-prev" aria-hidden="true"></span>
  100.                                 <span class="sr-only visually-hidden">Previous</span>
  101.                             </a>
  102.                             <a class="carousel-control-next carousel-control" role="button" data-slide="next"
  103.                                data-bs-slide="next" href="#lb-sYVZf768Dd{{ id }}">
  104.                                 <span class="mobi-mbri mobi-mbri-arrow-next" aria-hidden="true"></span>
  105.                                 <span class="sr-only visually-hidden">Next</span>
  106.                             </a>
  107.                         </div>
  108.                     </div>
  109.                 </div>
  110.             </div>
  111.         </div>
  112.     </div>
  113.     {% endfor %}
  114. </section>
  115. {#
  116. <section data-bs-version="5.1" class="gallery2 cid-sYtlpndbLA {{ bloc.bloc_margin_top }} {{ bloc.bloc_margin_bottom }}"
  117.          id="gallery2-36">
  118.     <div class="container col-10 col-xl-7">
  119.         <div class="media-container-column mb-5">
  120.             {% if bloc.bloc_titre %}
  121.                 <h3 class="mbr-section-title mbr-fonts-style display-2">
  122.                     <strong>{{ bloc.bloc_titre }}</strong>
  123.                 </h3>
  124.             {% endif %}
  125.             {% if bloc.bloc_sstitre %}
  126.                 <h4 class="mbr-section-sub-title mbr-fonts-style display-5">
  127.                     {{ bloc.bloc_sstitre }}
  128.                 </h4>
  129.             {% endif %}
  130.         </div>
  131.         {% set newLoop = 1 %}
  132.         {% set nbLoop = 0 %}
  133.         {% set loopOk3 = 0 %}
  134.         {% set loopOk2 = 0 %}
  135.         {% for media in medias %}
  136.             {% set mediaTmp = media.media_fichier %}
  137.             {% set mediaDefault = "default.jpg" %}
  138.             {% set mediaTmp = webp(webpSupported, mediaTmp)|url_encode %}
  139.             {% set mediaDefault = webp(webpSupported, mediaDefault) %}
  140.             {% if newLoop == 1 %}
  141.                 <div class="row row-content justify-content-center containerPicture">
  142.                 {% set newLoop = 0 %}
  143.             {% endif %}
  144.             {% if ((medias|length - loop.index0) >= 3 or (loop3 is defined and loop3 == 1)) and loopOk3 == 0 %}
  145.                 {% set loop3 = 1 %}
  146.                 <div class="card col-12 col-lg-3 col-md-6 col-lg-4">
  147.                     <div class=" {% if nbLoop == 1 %} secondImage {% endif %}">
  148.                         <div class="card-img small">
  149.                             <a
  150.                                     {% if media.media_lien %}
  151.                                         href="{{ media.media_lien }}"
  152.                                         {% if media.media_is_blank == 1 %} target="_blank" rel="noreferrer" {% endif %}
  153.                                     {% else %}
  154.                                         href="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_fancy') }}" target="_blank"
  155.                                     {% endif %}
  156.                                     rel="{{ bloc.bloc_titre|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  157.                                     title="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  158.                                     style="background-image:url({{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~type) }});"
  159.                                     data-fancybox>
  160.                                 <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  161.                                      alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  162.                                      loading="lazy" class="lazyload"
  163.                                      data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~type) }}">
  164.                             </a>
  165.                         </div>
  166.                     </div>
  167.                     {% if media.media_lien %}
  168.                         <a href="{{ media.media_lien }}" {% if media.media_is_blank == 1 %} target="_blank" rel="noreferrer" {% endif %}
  169.                            class="linkBtn"></a>
  170.                     {% endif %}
  171.                     {% if media.media_alt_display %}
  172.                         <div class="textContainer d-flex justify-content-center">
  173.                             <span class="text-center {% if nbLoop == 1 %} secondImage {% endif %}">{{ media.media_alt }}</span>
  174.                         </div>
  175.                     {% endif %}
  176.                 </div>
  177.                 {% set nbLoop = nbLoop + 1 %}
  178.                 {% if nbLoop == 3 %}
  179.                     {% set loop3 = 0 %}
  180.                     {% set nbLoop = 0 %}
  181.                     {% set newLoop = 1 %}
  182.                     {% set loopOk3 = 1 %}
  183.                 {% endif %}
  184.             {% elseif ((medias|length - loop.index0) == 2 or (loop2 is defined and loop2 == 1) ) or (((medias|length - loop.index0) >= 2 or (loop2 is defined and loop2 == 1)) and loopOk2 == 0) %}
  185.                 {% set loop2 = 1 %}
  186.                 <div class="card col-12 col-lg-3 col-md-6 col-lg-6">
  187.                     <div class="card-wrapper">
  188.                         <div class="card-img small">
  189.                             <a
  190.                                     {% if media.media_lien %}
  191.                                         href="{{ media.media_lien }}"
  192.                                         {% if media.media_is_blank == 1 %} target="_blank" rel="noreferrer" {% endif %}
  193.                                     {% else %}
  194.                                         href="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_fancy') }}" target="_blank"
  195.                                     {% endif %}
  196.                                     rel="{{ bloc.bloc_titre|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  197.                                     title="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  198.                                     style="background-image:url({{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~type) }});"
  199.                                     data-fancybox>
  200.                                 <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  201.                                      alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  202.                                      loading="lazy" class="lazyload"
  203.                                      data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~type) }}">
  204.                             </a>
  205.                         </div>
  206.                     </div>
  207.                 </div>
  208.                 {% set nbLoop = nbLoop + 1 %}
  209.                 {% if nbLoop == 2 %}
  210.                     {% set loop2 = 0 %}
  211.                     {% set nbLoop = 0 %}
  212.                     {% set newLoop = 1 %}
  213.                     {% set loopOk2 = 1 %}
  214.                 {% endif %}
  215.             {% elseif loopOk2 == 1 %}
  216.                 <div class="card col-md-6 col-lg-12">
  217.                     <div class="card-wrapper">
  218.                         <div class="card-img small">
  219.                             <a
  220.                                     {% if media.media_lien %}
  221.                                         href="{{ media.media_lien }}"
  222.                                         {% if media.media_is_blank == 1 %} target="_blank" rel="noreferrer" {% endif %}
  223.                                     {% else %}
  224.                                         href="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_fancy') }}" target="_blank"
  225.                                     {% endif %}
  226.                                     rel="{{ bloc.bloc_titre|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  227.                                     title="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  228.                                     style="background-image:url({{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~type) }});"
  229.                                     data-fancybox>
  230.                                 <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  231.                                      alt="{{ media.media_alt|default(bloc.bloc_titre)|default(page.ptitre~' '~page.ptitreonglet)|default(nomDuSite) }}"
  232.                                      loading="lazy" class="lazyload"
  233.                                      data-src="{{ asset('/medias_front/pages/'~mediaTmp) | imagine_filter('front_blocGalerie'~type) }}">
  234.                             </a>
  235.                         </div>
  236.                     </div>
  237.                 </div>
  238.                 {% set nbLoop = nbLoop + 1 %}
  239.                 {% if nbLoop == 1 %}
  240.                     {% set nbLoop = 0 %}
  241.                     {% set newLoop = 1 %}
  242.                     {% set loopOk3 = 0 %}
  243.                     {% set loopOk2 = 0 %}
  244.                 {% endif %}
  245.             {% endif %}
  246.             {% if newLoop == 1 %}
  247.                 </div>
  248.             {% endif %}
  249.         {% endfor %}
  250.     </div>
  251. </section> #}