tentative js slick carroussel

This commit is contained in:
2023-06-28 17:26:50 +02:00
parent 358b9ee790
commit f0c074426d
30 changed files with 1846 additions and 73 deletions
+5 -64
View File
@@ -159,71 +159,12 @@ jQuery(function($) {
// ///////////////////////////////
// slideshow home // work but does the same for all node-type-actualite, faut limiter à ceux dans la path-frontpage
// var slideIndex = 1;
// showDivs(slideIndex);
// function plusDivs(n) {
// showDivs(slideIndex += n);
// }
// function showDivs(n) {
// var i;
// var x = document.getElementsByPath("node-type-actualite");
// if (n > x.length) {slideIndex = 1}
// if (n < 1) {slideIndex = x.length} ;
// for (i = 0; i < x.length; i++) {
// x[i].style.display = "none";
// }
// x[slideIndex-1].style.display = "block";
// }
/////////////////////////////////////////////////
////////////////////////////////////////////////
// slideshow home // marche pas. attention ai rajouter des class dans template views.view.html.twig et views-view-actus-blocks-pages--block-1.html.twig
(function($, window) {
var mobile = false;
$(function(){
console.log("$ ready !!");
// if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i)){
// mobile = true;
// }
if($(".path-frontpage").length > 0){
console.log(".path-frontpage");
// $("#"+).fadeIn();
console.log('hello')
$('.slidshow-home2').slick({slidesToShow: 1,});
console.log('salut slick');
$(".node-type-actualite").slick({
dots: true,
slidesToShow: 1,
slidesToScroll: 1,
centerMode: true,
centerPadding: '500px',
// appendDots: $(element),
// // appendArrows: $(element),
arrows: true,
// prevArrow: '<button type="button" data-role="none" class="slick-prev">Previous</button>',
// // nextArrow: '<button type="button" data-role="none" class="slick-next">Next</button>',
// responsive: [
// {
// breakpoint: 800,
// settings: {
// centerPadding: '0',
// }
// }]
})(jQuery, window);
});
console.log(".node-type-actualite");
}
});
})(jQuery, window);
File diff suppressed because it is too large Load Diff