You've already forked ProfessionalWebsite
Published Version 1.0
This commit is contained in:
1217
Export/assets/js/CookieConsentComponent-cookieconsent.js
Normal file
1217
Export/assets/js/CookieConsentComponent-cookieconsent.js
Normal file
File diff suppressed because it is too large
Load Diff
40
Export/assets/js/bs-init.js
Normal file
40
Export/assets/js/bs-init.js
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
[].slice.call(document.querySelectorAll('[data-bss-disabled-mobile]')).forEach(function (elem) {
|
||||
elem.classList.remove('animated');
|
||||
elem.removeAttribute('data-bss-hover-animate');
|
||||
elem.removeAttribute('data-aos');
|
||||
elem.removeAttribute('data-bss-parallax-bg');
|
||||
elem.removeAttribute('data-bss-scroll-zoom');
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
var hoverAnimationTriggerList = [].slice.call(document.querySelectorAll('[data-bss-hover-animate]'));
|
||||
var hoverAnimationList = hoverAnimationTriggerList.forEach(function (hoverAnimationEl) {
|
||||
hoverAnimationEl.addEventListener('mouseenter', function(e){ e.target.classList.add('animated', e.target.dataset.bssHoverAnimate) });
|
||||
hoverAnimationEl.addEventListener('mouseleave', function(e){ e.target.classList.remove('animated', e.target.dataset.bssHoverAnimate) });
|
||||
});
|
||||
|
||||
var swipers = document.querySelectorAll('[data-bss-swiper]');
|
||||
var swiperNavigations = document.querySelectorAll('.swiper-nav-standalone');
|
||||
|
||||
for (var swiper of swipers) {
|
||||
let config = JSON.parse(swiper.dataset.bssSwiper);
|
||||
|
||||
if (!config.navigation) {
|
||||
config.navigation = {};
|
||||
|
||||
for (let swiperNavigation of swiperNavigations) {
|
||||
if (swiperNavigation.dataset.bssSwiperTarget === '#' + swiper.id) {
|
||||
config.navigation.prevEl = swiperNavigation.querySelector('.swiper-button-prev');
|
||||
config.navigation.nextEl = swiperNavigation.querySelector('.swiper-button-next');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let slider = new Swiper(swiper, config);
|
||||
}
|
||||
}, false);
|
||||
1
Export/assets/js/pikaday.min.js
vendored
Normal file
1
Export/assets/js/pikaday.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
Export/assets/js/smart-forms.min.js
vendored
Normal file
1
Export/assets/js/smart-forms.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
56
Export/assets/js/text-carousel.js
Normal file
56
Export/assets/js/text-carousel.js
Normal file
@@ -0,0 +1,56 @@
|
||||
var TxtRotate = function(el, toRotate, period) {
|
||||
this.toRotate = toRotate;
|
||||
this.el = el;
|
||||
this.loopNum = 0;
|
||||
this.period = parseInt(period, 10) || 2000;
|
||||
this.txt = '';
|
||||
this.tick();
|
||||
this.isDeleting = false;
|
||||
};
|
||||
|
||||
TxtRotate.prototype.tick = function() {
|
||||
var i = this.loopNum % this.toRotate.length;
|
||||
var fullTxt = this.toRotate[i];
|
||||
|
||||
if (this.isDeleting) {
|
||||
this.txt = fullTxt.substring(0, this.txt.length - 1);
|
||||
} else {
|
||||
this.txt = fullTxt.substring(0, this.txt.length + 1);
|
||||
}
|
||||
|
||||
this.el.innerHTML = '<span class="wrap">'+this.txt+'</span>';
|
||||
|
||||
var that = this;
|
||||
var delta = 300 - Math.random() * 100;
|
||||
|
||||
if (this.isDeleting) { delta /= 2; }
|
||||
|
||||
if (!this.isDeleting && this.txt === fullTxt) {
|
||||
delta = this.period;
|
||||
this.isDeleting = true;
|
||||
} else if (this.isDeleting && this.txt === '') {
|
||||
this.isDeleting = false;
|
||||
this.loopNum++;
|
||||
delta = 500;
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
that.tick();
|
||||
}, delta);
|
||||
};
|
||||
|
||||
window.onload = function() {
|
||||
var elements = document.getElementsByClassName('txt-rotate');
|
||||
for (var i=0; i<elements.length; i++) {
|
||||
var toRotate = elements[i].getAttribute('data-rotate');
|
||||
var period = elements[i].getAttribute('data-period');
|
||||
if (toRotate) {
|
||||
new TxtRotate(elements[i], JSON.parse(toRotate), period);
|
||||
}
|
||||
}
|
||||
// INJECT CSS
|
||||
var css = document.createElement("style");
|
||||
css.type = "text/css";
|
||||
css.innerHTML = ".txt-rotate > .wrap { border-right: 0.08em solid #666 }";
|
||||
document.body.appendChild(css);
|
||||
};
|
||||
5
Export/assets/js/theme.js
Normal file
5
Export/assets/js/theme.js
Normal file
@@ -0,0 +1,5 @@
|
||||
document.querySelectorAll('.datepicker').forEach(function(field) {
|
||||
var picker = new Pikaday({
|
||||
field: field
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user