1Vue.create({ 2 el: "#app", 3 mounted() { 4 this.$hideSplash(); 5 this.initializeCarousel(); 6 }, 7 methods: { 8 initializeCarousel() { 9 // CAROUSEL OPTIONS FOR CATEGORIES 10 const categoryOptions = { 11 slidesPerView: 1, 12 spacing: 20, 13 loop: false, 14 transitionSpeed: 1500, 15 16 breakpoints: { 17 0: { 18 slidesPerView: 3, 19 }, 20 640: { 21 slidesPerView: 3, 22 }, 23 768: { 24 slidesPerView: 3, 25 }, 26 1024: { 27 slidesPerView: 5, 28 }, 29 }, 30 }; 31 32 // INIT CAROUSEL 1 33 const carousel1 = new CgCarousel("#js-carousel-1", categoryOptions, {}); 34 35 // Navigation 36 const next1 = document.getElementById("js-carousel__next-1"); 37 const prev1 = document.getElementById("js-carousel__prev-1"); 38 39 if (next1) { 40 next1.addEventListener("click", () => carousel1.next()); 41 } 42 43 if (prev1) { 44 prev1.addEventListener("click", () => carousel1.prev()); 45 } 46 47 // CAROUSEL OPTIONS FOR TESTIMONIALS 48 const testimonialsOptions = { 49 loop: true, 50 slidesPerView: 1, 51 spacing: 10, 52 autoplay: false, 53 54 breakpoints: { 55 0: { 56 slidesPerView: 1, 57 }, 58 59 640: { 60 slidesPerView: 1, 61 }, 62 63 768: { 64 slidesPerView: 3, 65 }, 66 67 1024: { 68 slidesPerView: 3, 69 }, 70 }, 71 }; 72 73 // INIT CAROUSEL 4 74 const testimonialContainer = document.getElementById("js-carousel-4"); 75 76 if (!testimonialContainer) return; 77 78 const carousel4 = new CgCarousel( 79 "#js-carousel-4", 80 testimonialsOptions, 81 {}, 82 ); 83 84 // Navigation 85 const next4 = document.getElementById("js-carousel__next-4"); 86 87 if (next4) { 88 next4.addEventListener("click", () => { 89 carousel4.next(); 90 }); 91 } 92 93 const prev4 = document.getElementById("js-carousel__prev-4"); 94 95 if (prev4) { 96 prev4.addEventListener("click", () => { 97 carousel4.prev(); 98 }); 99 } 100 }, 101 }, 102});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.