@import "../../resources/scss/util/variables";
@import "../../resources/scss/util/colours";
@import "../../resources/scss/util/mixins";
.block-featured-pods {
position: relative;
z-index: 2;
background-color: $veryLightBlue;
padding-bottom: rem-calc(40);
.swiper {
margin-top: rem-calc(-40);
}
.swiper-slide {
height: auto;
}
.e-carousel__navigation {
margin-left: 0;
justify-content: center;
margin-top: rem-calc(20);
}
.e-article-pod {
margin-top: rem-calc(0);
transition: all 0.2s ease-in-out;
height: 100%;
}
.st-stagger-reveal {
height: 100%;
}
}
class FeaturedPods {
/**
* Create and initialise objects of this class
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor
* @param {object} block
*/
constructor() {
this.blocks = document.querySelectorAll('.block-featured-pods');
this.init();
}
/**
* Example function to run class logic
* Can access `this.block`
*/
init() {
this.blocks.forEach((block) => {
const blockCarousel = block.querySelector(".swiper");
const navNext = block.querySelector(".e-carousel__next");
const navPrev = block.querySelector(".e-carousel__prev");
const swiper = new Swiper(blockCarousel, {
slidesPerView: 1,
spaceBetween: 15,
navigation: {
nextEl: navNext,
prevEl: navPrev,
},
breakpoints: {
992: {
slidesPerView: 3,
},
// 992: {
// slidesPerView: 5,
// }
}
});
});
}
}
new FeaturedPods();