forked from projects/fipamo
ro
8bf640ee18
conversion of markdown files to html works fine, but the coresponding css, js and image assets were not being moved, so the class responsible for moving them was edited so theme assets are moved to their appropriate directories when the site is published. also made some css and image edits, and removed a legacy css files that were no longer in use
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
export default class Base {
|
|
//--------------------------
|
|
// constructor
|
|
//--------------------------
|
|
constructor() {
|
|
this.currentSlide = 0;
|
|
this.slides = document.querySelectorAll('.slide');
|
|
//alert('FRESH');
|
|
document.getElementById('menu-open').addEventListener('click', e => {
|
|
document.getElementById('menu').style.opacity = '100%';
|
|
document.getElementById('menu').style.visibility = 'visible';
|
|
});
|
|
document.getElementById('menu-close').addEventListener('click', e => {
|
|
document.getElementById('menu').style.opacity = '0';
|
|
document.getElementById('menu').style.visibility = 'hidden';
|
|
});
|
|
this.start();
|
|
}
|
|
start() {
|
|
if (this.slides.length > 1) {
|
|
this.slideInterval = setInterval(() => {
|
|
this.slides[this.currentSlide].className = 'hide slide';
|
|
this.currentSlide = (this.currentSlide + 1) % this.slides.length;
|
|
this.slides[this.currentSlide].className = 'show slide';
|
|
}, 3000);
|
|
}
|
|
}
|
|
//--------------------------
|
|
// methods
|
|
//--------------------------
|
|
|
|
//--------------------------
|
|
// event handlers
|
|
//--------------------------
|
|
}
|