a70bb7b2b0
Cleaned up the themes folder since it did not need the additional folder depth to manage bundled scripts anymore. Updated the theme engine accordingly.
28 lines
730 B
JavaScript
28 lines
730 B
JavaScript
export default class Base {
|
|
//--------------------------
|
|
// constructor
|
|
//--------------------------
|
|
constructor() {
|
|
this.currentSlide = 0;
|
|
this.slides = document.querySelectorAll('[role="slide"]');
|
|
//alert("FRESH");
|
|
this.start();
|
|
}
|
|
start() {
|
|
if (this.slides.length > 1) {
|
|
this.slideInterval = setInterval(() => {
|
|
this.slides[this.currentSlide].className = "hide";
|
|
this.currentSlide = (this.currentSlide + 1) % this.slides.length;
|
|
this.slides[this.currentSlide].className = "show";
|
|
}, 3000);
|
|
}
|
|
}
|
|
//--------------------------
|
|
// methods
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
// event handlers
|
|
//--------------------------
|
|
}
|