templates/home/index.html.twig line 1

  1. {% extends 'base.html.twig' %}
  2. {% block title %}Accueil{% endblock %}
  3. {% block stylesheets %}
  4.     <link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css" />
  5.     <link rel="stylesheet" href="{{ asset('assets/front/swiper.css') }}" />
  6.     <link rel="stylesheet" href="{{ asset('assets/front/accueil.css') }}" />    
  7. {% endblock %}
  8. {% block body %}
  9.     {% include 'home/slider.html.twig' %}
  10.     {% include 'home/cabinet.html.twig' %}
  11.     {% include 'home/categories.html.twig' %}
  12.     {# {% include 'home/protocoles.html.twig' %} #}
  13.     {% include 'home/materiel.html.twig' %}
  14.     {% include 'home/news.html.twig' %}    
  15.    
  16. {% endblock %}
  17.  {% block javascripts %} 
  18.     <!-- Swiper JS -->
  19.     <script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>
  20.     <!-- Initialize Swiper du slider -->
  21.     <script>
  22.         var swiper = new Swiper(".mySwiper", {
  23.         speed: 600,
  24.         parallax: true,
  25.         autoplay: {
  26.             delay: 2500,
  27.             disableOnInteraction: false,
  28.         },
  29.         pagination: {
  30.             el: ".swiper-pagination",
  31.             clickable: true,
  32.         },
  33.         navigation: {
  34.             nextEl: ".swiper-button-next",
  35.             prevEl: ".swiper-button-prev",
  36.         },
  37.         });
  38.     </script>
  39.     <!-- Initialize Swiper des protocoles -->
  40.     <script>
  41.       var swiper = new Swiper('.swiper', {
  42.         slidesPerView: 6,
  43.         spaceBetween: 10,
  44.         direction: 'horizontal',
  45.         navigation: {
  46.           nextEl: '.swiper-button-next',
  47.           prevEl: '.swiper-button-prev',
  48.         },
  49.         breakpoints: {
  50.            1300: {
  51.             slidesPerView: 6,
  52.             spaceBetween: 10,
  53.           },
  54.           1024: {
  55.             slidesPerView: 5,
  56.           },
  57.            768: {
  58.             slidesPerView: 4,
  59.           },
  60.           640: {
  61.             slidesPerView: 3,
  62.           },
  63.           480: {
  64.             slidesPerView: 2,
  65.             spaceBetween: 20,
  66.           },
  67.           100: {
  68.             slidesPerView: 1,
  69.             spaceBetween: 20, 
  70.           }, 
  71.         },
  72.       });
  73.       /* function getDirection() {
  74.         var windowWidth = window.innerWidth;
  75.         var direction = window.innerWidth <= 760 ? 'vertical' : 'horizontal';
  76.         return direction;
  77.       } */
  78.     </script>
  79.  {% endblock %}