templates/partials/_slider_reference.html.twig line 1

Open in your IDE?
  1.     <div class="container-fluid text-center justify-content-center p-3 mt-5">
  2.         <div class="row d-flex justify-content-center gap-3">
  3.             <div class="row justify-content-center">
  4.                 <div class="col">
  5.                     <div class="row justify-content-center p-3">
  6.                         <div id="Références" class="col-sm-12 col-md-12 col-lg-6 noEffect">
  7.                             <h2>Références</h2>
  8.                         </div>
  9.                         <svg class="swiper-button-prev-index noEffect" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
  10.                         <path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
  11.                         </svg>
  12.                         <svg class="swiper-button-next-index noEffect" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
  13.                         <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
  14.                         </svg>
  15.                     </div>
  16.                 </div>
  17.             </div>
  18.         </div>
  19.     </div>
  20.     <div class="container-fluid text-center d-flex justify-content-center align-items-center">
  21.         <div class="col-md-10 swiper">
  22.             <div class="swiper-wrapper">
  23.                 {% for reference in references %}
  24.                     <div class="card swiper-slide align-content-between background-color-1">
  25.                         <div class="div px-5 pt-3 pb-3">
  26.                             <img src="{{ asset('/media/fullsize/' ~ reference.image.file)| imagine_filter('slider') }}" class="card-img-top imgborder" alt="{{ reference.image.alt }}" title="{{ reference.image.title }}">
  27.                         </div>
  28.                         <div class="card-body d-flex align-items-center justify-content-center px-2 noEffect background-color-1">
  29.                             <div class="row noEffect">
  30.                                 <h3>{{ reference.title }}</h3>
  31.                             </div>
  32.                         </div>
  33.                         <div class="card-footer pb-4 cardheight1 background-color-1">
  34.                             <p class="p-1">{{ reference.text }}</p>
  35.                         </div>
  36.                         <div class="p-5">
  37.                             <a href="{{ reference.link }}" target="_blank" class="btn3">{{ reference.button }}</a>
  38.                         </div>
  39.                     </div>
  40.                 {% endfor %}
  41.             </div>
  42.         </div>
  43.     </div>
  44. <script defer>
  45.       //creation du slide   
  46.      var swiper = new Swiper(".swiper", {
  47.         autoplay:true,
  48.         grabCursor: true,
  49.         direction: 'horizontal',
  50.         slidesPerView: 3,
  51.         spaceBetween: 10,
  52.         loop:true,
  53.         centeredSlides:false,
  54.         
  55.         navigation: {
  56.         nextEl: '.swiper-button-next-index',
  57.         prevEl: '.swiper-button-prev-index',
  58.         },
  59.         // And if we need scrollbar
  60.         //scrollbar: {
  61.             //el: '.swiper-scrollbar',
  62.             //draggable:true,
  63.         //},
  64.         //mousewheel:{
  65.             //enabled:true,
  66.             //},
  67.         
  68.         // using "ratio" endpoints
  69.         breakpoints: {
  70.             '100': {
  71.                 slidesPerView: 1,
  72.                 spaceBetween: 10,
  73.                 }, 
  74.             '320': {
  75.                 slidesPerView: 1,
  76.                 spaceBetween: 10,
  77.                 }, 
  78.             '540': {
  79.                 slidesPerView: 2,
  80.                 spaceBetween: 10,
  81.                 },   
  82.             '800': {
  83.             slidesPerView: 3,
  84.             spaceBetween: 10,
  85.             },
  86.         }
  87.         });
  88.     </script>
  89.