remove code js non utilisé
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -14,29 +14,6 @@
 | 
			
		||||
  } (Drupal));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // jQuery(document).ready(function($){
 | 
			
		||||
 | 
			
		||||
  //   $('.open-block').click(function(){
 | 
			
		||||
  //     $(this).toggleClass('opened');
 | 
			
		||||
 | 
			
		||||
  //     $('.header_nav_container').toggleClass('display-nav-opened');
 | 
			
		||||
    
 | 
			
		||||
  //     if(mobile == true){
 | 
			
		||||
  //       $("body").css("overflow","hidden");
 | 
			
		||||
  //     }
 | 
			
		||||
 | 
			
		||||
  //   });
 | 
			
		||||
  
 | 
			
		||||
  //   // Hide the header_nav_container when a link inside it is clicked
 | 
			
		||||
  //   $('.header_nav_container li').click(function() {
 | 
			
		||||
  //       $('.header_nav_container').fadeOut();
 | 
			
		||||
  //   });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  // });
 | 
			
		||||
 | 
			
		||||
  //////// start header ////////////
 | 
			
		||||
  document.addEventListener('DOMContentLoaded', function() {
 | 
			
		||||
 | 
			
		||||
@@ -288,84 +265,6 @@
 | 
			
		||||
 | 
			
		||||
  // //////////////////// start Timeline script ///////////////////////
 | 
			
		||||
 | 
			
		||||
  // // document.addEventListener('DOMContentLoaded', function() {
 | 
			
		||||
  // //   let currentSlide = 0;
 | 
			
		||||
  
 | 
			
		||||
  // //   //// responsive ///
 | 
			
		||||
  // //   function getVisibleSlides() {
 | 
			
		||||
  // //     if (window.innerWidth <= 600) {
 | 
			
		||||
  // //       return 1; // Show 1 slide on small screens
 | 
			
		||||
  // //     } else if (window.innerWidth <= 900) {
 | 
			
		||||
  // //       return 4; // Show 4 slides on medium screens
 | 
			
		||||
  // //     } else {
 | 
			
		||||
  // //       return 4; // Show 4 slides on large screens
 | 
			
		||||
  // //     }
 | 
			
		||||
  // //   }
 | 
			
		||||
  
 | 
			
		||||
  // //   function showSlides(index) {
 | 
			
		||||
  // //     const slides = document.querySelectorAll('.__paragraphs');
 | 
			
		||||
  // //     const totalSlides = slides.length;
 | 
			
		||||
  // //     const visibleSlides = getVisibleSlides();
 | 
			
		||||
  // //     const maxSlide = totalSlides - visibleSlides;
 | 
			
		||||
  
 | 
			
		||||
  // //     // Adjust the index to ensure it loops
 | 
			
		||||
  // //     if (index > maxSlide) {
 | 
			
		||||
  // //       currentSlide = 0; // Go back to the first slide
 | 
			
		||||
  // //     } else if (index < 0) {
 | 
			
		||||
  // //       currentSlide = maxSlide; // Go to the last slide
 | 
			
		||||
  // //     } else {
 | 
			
		||||
  // //       currentSlide = index;
 | 
			
		||||
  // //     }
 | 
			
		||||
  
 | 
			
		||||
  // //     // Calculate the offset for the transform
 | 
			
		||||
  // //     const offset = currentSlide * -50 / visibleSlides;
 | 
			
		||||
  // //     const offsetmobile = currentSlide * -10 / visibleSlides;
 | 
			
		||||
  // //     let timeline = document.querySelector('.__timeline-content');
 | 
			
		||||
  // //     if (timeline) {
 | 
			
		||||
  // //       if (window.innerWidth <= 600){
 | 
			
		||||
  // //         timeline.style.transform = `translateX(${offsetmobile}%)`;
 | 
			
		||||
  // //       } else {
 | 
			
		||||
  // //         timeline.style.transform = `translateX(${offset}%)`;
 | 
			
		||||
  // //       }
 | 
			
		||||
  // //     }
 | 
			
		||||
  
 | 
			
		||||
  // //     // Enable/disable arrows based on the current slide
 | 
			
		||||
  // //     // document.getElementById('arrowPrev').disabled = false; // Always enabled now
 | 
			
		||||
  // //     // document.getElementById('arrowNext').disabled = false; // Always enabled now
 | 
			
		||||
  // //     // Attach event listeners
 | 
			
		||||
  // //     let arrowprev = document.getElementById('arrowPrev');
 | 
			
		||||
  // //     if (arrowprev) {
 | 
			
		||||
  // //       arrowprev.disabled = false; // Always enabled now
 | 
			
		||||
  // //     }
 | 
			
		||||
  // //     let arrownext = document.getElementById('arrowNext')
 | 
			
		||||
  // //     if (arrownext) {
 | 
			
		||||
  // //       arrownext.disabled = false; // Always enabled now
 | 
			
		||||
  // //     }
 | 
			
		||||
  // //   }
 | 
			
		||||
  
 | 
			
		||||
  // //   // function prevSlide() {
 | 
			
		||||
  // //   //   showSlides(currentSlide - 1);
 | 
			
		||||
  // //   // }
 | 
			
		||||
  
 | 
			
		||||
  // //   // function nextSlide() {
 | 
			
		||||
  // //   //   showSlides(currentSlide + 1);
 | 
			
		||||
  // //   // }
 | 
			
		||||
  
 | 
			
		||||
  // //   // // Attach event listeners
 | 
			
		||||
  // //   // document.getElementById('arrowPrev').addEventListener('click', prevSlide);
 | 
			
		||||
  // //   // document.getElementById('arrowNext').addEventListener('click', nextSlide);
 | 
			
		||||
  
 | 
			
		||||
  // //   // Attach event listeners
 | 
			
		||||
  // //   let arrowprev = document.getElementById('arrowPrev');
 | 
			
		||||
  // //   if (arrowprev) {
 | 
			
		||||
  // //     arrowprev.addEventListener('click', prevSlide);
 | 
			
		||||
  // //   }
 | 
			
		||||
  // //   let arrownext = document.getElementById('arrowNext')
 | 
			
		||||
  // //   if (arrownext) {
 | 
			
		||||
  // //     arrownext.addEventListener('click', nextSlide);
 | 
			
		||||
  // //   }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    // Update month field to only show the first 3 letters
 | 
			
		||||
    document.querySelectorAll('.paragraph--type--phase-deroulement').forEach(function(paragraph) {
 | 
			
		||||
      const monthField = paragraph.querySelector('.field_field_date_de_moi div:nth-of-type(2)');
 | 
			
		||||
@@ -413,20 +312,6 @@
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
  //   // Configuration de l'observateur
 | 
			
		||||
  //   const config = { childList: true, subtree: true };
 | 
			
		||||
  
 | 
			
		||||
  //   // Démarrer l'observateur sur le document entier ou sur un conteneur spécifique
 | 
			
		||||
  //   observer.observe(document.body, config);
 | 
			
		||||
  
 | 
			
		||||
  // //   // Handle window resize
 | 
			
		||||
  // //   window.addEventListener('resize', function() {
 | 
			
		||||
  // //     showSlides(currentSlide); // Recalculate the slides on resize
 | 
			
		||||
  // //   });
 | 
			
		||||
  
 | 
			
		||||
  // //   // Initialize
 | 
			
		||||
  // //   showSlides(currentSlide);
 | 
			
		||||
  // // });
 | 
			
		||||
 | 
			
		||||
  //   ////////////////////// start  calendrier home   /////////////////////////////////
 | 
			
		||||
    $(document).ready(function(){
 | 
			
		||||
@@ -518,48 +403,8 @@
 | 
			
		||||
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
      ////////////////////// start  diaporama home swiper  /////////////////////////////////
 | 
			
		||||
      
 | 
			
		||||
      // PAS DE SWIPER CHARGÉ DANS L'ENV JS ...
 | 
			
		||||
 | 
			
		||||
      // $(document).ready(function () {
 | 
			
		||||
      //   //initialize swiper when document ready
 | 
			
		||||
      //   let mySwiper = new Swiper ('.swiper-container', {
 | 
			
		||||
          
 | 
			
		||||
      //     speed: 400,
 | 
			
		||||
      //     spaceBetween: 100,
 | 
			
		||||
      //     // Optional parameters
 | 
			
		||||
      //     autoplay: {
 | 
			
		||||
      //       delay: 3000,
 | 
			
		||||
      //       disableOnInteraction: false,
 | 
			
		||||
      //     },
 | 
			
		||||
      //     direction: 'horizontal',
 | 
			
		||||
      //     loop: true,
 | 
			
		||||
      //   })
 | 
			
		||||
      // });
 | 
			
		||||
  
 | 
			
		||||
      ////////////////////// end  diaporama home swiper /////////////////////////////////
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  ////////////////////// start  diaporama home swiper  /////////////////////////////////
 | 
			
		||||
 | 
			
		||||
  // $(document).ready(function () {
 | 
			
		||||
  //   //initialize swiper when document ready
 | 
			
		||||
  //   var mySwiper = new Swiper ('.swiper-container', {
 | 
			
		||||
      
 | 
			
		||||
  //     speed: 400,
 | 
			
		||||
  //     spaceBetween: 100,
 | 
			
		||||
  //     // Optional parameters
 | 
			
		||||
  //     autoplay: {
 | 
			
		||||
  //       delay: 3000,
 | 
			
		||||
  //       disableOnInteraction: false,
 | 
			
		||||
  //     },
 | 
			
		||||
  //     direction: 'horizontal',
 | 
			
		||||
  //     loop: true,
 | 
			
		||||
  //   })
 | 
			
		||||
  // });
 | 
			
		||||
 | 
			
		||||
  ////////////////////// end  diaporama home swiper /////////////////////////////////
 | 
			
		||||
 | 
			
		||||
  $(document).ready(function () {
 | 
			
		||||
    let diapohome = $('.config_pages--type--diaporama-home .diaporama');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user