You've already forked Atomcms-edit
Initial commit
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
||||
import Swiper from "swiper";
|
||||
|
||||
const AtomSliders = {
|
||||
init() {
|
||||
document.addEventListener("turbolinks:load", () => {
|
||||
this.initArticleSlider();
|
||||
});
|
||||
},
|
||||
|
||||
initArticleSlider() {
|
||||
if (!document.querySelector(".article-slider")) return;
|
||||
|
||||
new Swiper(".articles-slider", {
|
||||
modules: [],
|
||||
slidesPerView: 1,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
disableOnInteraction: false,
|
||||
pauseOnMouseEnter: true,
|
||||
},
|
||||
pagination: {
|
||||
el: ".swiper-pagination",
|
||||
clickable: true,
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export { AtomSliders as default };
|
||||
Reference in New Issue
Block a user