first
This commit is contained in:
6
public/web/assets/js/bootstrap.min.js
vendored
Normal file
6
public/web/assets/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
679
public/web/assets/js/custom.js
Normal file
679
public/web/assets/js/custom.js
Normal file
@@ -0,0 +1,679 @@
|
||||
(function($) {
|
||||
"use strict";
|
||||
/*----------------------------------------------------
|
||||
* Theme Loader
|
||||
* Mobile Menu
|
||||
* Menu Bar Popup Icon
|
||||
* Search Icon Popup
|
||||
* Sidebar Popup
|
||||
* Service One
|
||||
* Service Two
|
||||
* Portfolio One
|
||||
* Portfolio Two
|
||||
* Portfolio Three
|
||||
* Testimonial One
|
||||
* Testimonial Two
|
||||
* Blog
|
||||
* Banner
|
||||
* CounterUp
|
||||
* Video Popup
|
||||
* WOW
|
||||
* Services
|
||||
* Thumb Banner Slider
|
||||
* Dark & Light Switch
|
||||
* Custom Cursor
|
||||
* Portfolio Filter
|
||||
* Scroll To Top
|
||||
* Register GSAP
|
||||
* Bounce Animation
|
||||
* Split Title
|
||||
----------------------------------------------------*/
|
||||
|
||||
///============= * Theme Loader =============\\\
|
||||
$(document).ready(function () {
|
||||
$('.theme-loader').hide();
|
||||
});
|
||||
|
||||
///============= * Mobile Menu =============\\\
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var mobileMenu = document.getElementById("mobilemenu");
|
||||
var mainMenu = document.querySelector(".vertical_menu");
|
||||
var clonedMenu = mobileMenu.cloneNode(true);
|
||||
mainMenu.appendChild(clonedMenu);
|
||||
});
|
||||
jQuery(document).ready(function($) {
|
||||
$('.vertical_menu ul li.menu-item-has-children').append('<span class="mobile-arrows far fa-plus"></span>');
|
||||
|
||||
$(".vertical_menu .mobile-arrows").click(function() {
|
||||
$(this).parent().find('ul:first').slideToggle(300);
|
||||
$(this).toggleClass('is-open');
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Menu Bar Popup Icon =============\\\
|
||||
$('.menu__bar i').on("click", function() {
|
||||
$(this).toggleClass('clicked');
|
||||
$('.menu__bar-popup').toggleClass('show');
|
||||
$('.menu__bar-popup-overlay').addClass('show');
|
||||
});
|
||||
$('.menu__bar-popup .close').on("click", function() {
|
||||
$('.menu__bar i').removeClass('clicked');
|
||||
$('.menu__bar-popup').removeClass('show');
|
||||
$('.menu__bar-popup-overlay').removeClass('show');
|
||||
});
|
||||
|
||||
///============= * Search Icon Popup =============\\\
|
||||
$(".header__area-menubar-center-search-icon.open, .header__area-menubar-right-search-icon.open").on("click", function () {
|
||||
$(".header__area-menubar-center-search-box, .header__area-menubar-right-search-box")
|
||||
.fadeIn()
|
||||
.addClass("active");
|
||||
}
|
||||
);
|
||||
$(".header__area-menubar-center-search-box-icon, .header__area-menubar-right-search-box-icon").on("click", function () {
|
||||
$(this).fadeIn().removeClass("active");
|
||||
});
|
||||
$(".header__area-menubar-center-search-box-icon i, .header__area-menubar-right-search-box-icon i").on("click", function () {
|
||||
$(".header__area-menubar-center-search-box, .header__area-menubar-right-search-box")
|
||||
.fadeOut()
|
||||
.removeClass("active");
|
||||
}
|
||||
);
|
||||
|
||||
///============= * Sidebar Popup =============\\\
|
||||
$(document).on("click", ".header__area-menubar-right-sidebar-icon", function () {
|
||||
$('.header__area-menubar-right-sidebar-popup').addClass('active');
|
||||
$('.sidebar-overlay').addClass('show');
|
||||
});
|
||||
$(document).on("click", ".header__area-menubar-right-sidebar-popup .sidebar-close-btn", function () {
|
||||
$('.header__area-menubar-right-sidebar-popup').removeClass('active');
|
||||
$('.sidebar-overlay').removeClass('show');
|
||||
});
|
||||
|
||||
///============= * Service One =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".services_slide", {
|
||||
spaceBetween: 25,
|
||||
slidesPerView: 4,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.service_next',
|
||||
prevEl: '.service_prev',
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1025: {
|
||||
slidesPerView: 4,
|
||||
},
|
||||
1600: {
|
||||
slidesPerView: 4,
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Service Two =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".services_four_slide", {
|
||||
spaceBetween: 25,
|
||||
slidesPerView: 3,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1025: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Portfolio One =============\\\
|
||||
jQuery(document).ready(function($) {
|
||||
$('.portfolio__four-area-item').mouseenter(function() {
|
||||
$('.portfolio__four-area-item').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Portfolio Two =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".portfolio_slide", {
|
||||
spaceBetween: 25,
|
||||
slidesPerView: 4,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.portfolio_next',
|
||||
prevEl: '.portfolio_prev',
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1025: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
1600: {
|
||||
slidesPerView: 2.7,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Portfolio Three =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".portfolio_three_slide", {
|
||||
spaceBetween: 25,
|
||||
centeredSlides: true,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.portfolio_next',
|
||||
prevEl: '.portfolio_prev',
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 1.5,
|
||||
},
|
||||
1025: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
1600: {
|
||||
slidesPerView: 3.7,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Testimonial One =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".testimonial_slide", {
|
||||
spaceBetween: 25,
|
||||
centeredSlides: true,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.testimonial_next',
|
||||
prevEl: '.testimonial_prev',
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 1.4,
|
||||
},
|
||||
1025: {
|
||||
slidesPerView: 2.4,
|
||||
},
|
||||
1600: {
|
||||
slidesPerView: 2.5,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Testimonial Two =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".testimonial_two_slide", {
|
||||
spaceBetween: 25,
|
||||
centeredSlides: true,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.testimonial_next',
|
||||
prevEl: '.testimonial_prev',
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
centeredSlides: false,
|
||||
},
|
||||
1025: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
1600: {
|
||||
slidesPerView: 4,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Blog =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".blog_slide", {
|
||||
spaceBetween: 25,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
slidesPerView: 3,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.blog_next',
|
||||
prevEl: '.blog_prev',
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1200: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Banner =============\\\
|
||||
$(document).ready(function () {
|
||||
var swiper = new Swiper(".banner_three", {
|
||||
spaceBetween: 25,
|
||||
speed: 1000,
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 4000,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.banner_next',
|
||||
prevEl: '.banner_prev',
|
||||
},
|
||||
breakpoints: {
|
||||
0: {
|
||||
slidesPerView: 1.3,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1025: {
|
||||
slidesPerView: 1.6,
|
||||
},
|
||||
1600: {
|
||||
slidesPerView: 1.7,
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
///============= * CounterUp =============\\\
|
||||
var counter = $('.counter');
|
||||
counter.counterUp({
|
||||
time: 2500,
|
||||
delay: 100
|
||||
});
|
||||
|
||||
///============= * Skill Bar =============\\\
|
||||
if($('.skill__area-item-bar').length) {
|
||||
$('.skill__area-item-bar').appear(function() {
|
||||
var el = $(this);
|
||||
var percent = el.data('width');
|
||||
$(el).css('width', percent + '%');
|
||||
}, {
|
||||
accY: 0
|
||||
});
|
||||
};
|
||||
|
||||
///============= * Video Popup =============\\\
|
||||
$('.video-popup').magnificPopup({
|
||||
type: 'iframe'
|
||||
});
|
||||
|
||||
/*========== * Award Active Hover ==========*/
|
||||
$('.award__area-list-item').on('mousemove', function (e) {
|
||||
var service_id = $(this).data("service");
|
||||
$('.award__area-left-image.item-' + service_id).addClass('active').siblings().removeClass('active');
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
});
|
||||
|
||||
///============= * WOW =============\\\
|
||||
if ($(".wow").length) {
|
||||
var wow = new WOW({
|
||||
boxClass: "wow",
|
||||
animateClass: "animated",
|
||||
mobile: true,
|
||||
live: true,
|
||||
});
|
||||
wow.init();
|
||||
}
|
||||
|
||||
///============= * Services =============\\\
|
||||
$(document).ready(function(){
|
||||
$(".services__three-item-title.active")
|
||||
.closest('.services__three-item')
|
||||
.addClass('active')
|
||||
.find('.services__three-item-body').show();
|
||||
|
||||
$(".services__three-item-title").mouseenter(function(){
|
||||
var $toggle = $(this).closest('.services__three-item');
|
||||
|
||||
$(".services__three-item-title").not(this).removeClass("active");
|
||||
$(".services__three-item").not($toggle).removeClass('active').find('.services__three-item-body').slideUp(300);
|
||||
|
||||
$(this).toggleClass("active");
|
||||
$toggle.toggleClass('active').find('.services__three-item-body').slideToggle(300);
|
||||
});
|
||||
});
|
||||
|
||||
///============= * Thumb Banner Slider =============\\\
|
||||
var banner_three_thumb = new Swiper(".slide_thumb", {
|
||||
spaceBetween: 0,
|
||||
slidesPerView: 3,
|
||||
freeMode: true,
|
||||
watchSlidesProgress: true,
|
||||
autoplay: {
|
||||
delay: 4500,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
}
|
||||
});
|
||||
let sliderActive2 = '.slide_three';
|
||||
let sliderInit2 = new Swiper(sliderActive2, {
|
||||
slidesPerView: 1,
|
||||
loop: true,
|
||||
effect: 'fade',
|
||||
autoplay: {
|
||||
delay: 4500,
|
||||
reverseDirection: false,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.banner_next',
|
||||
prevEl: '.banner_prev',
|
||||
},
|
||||
thumbs: {
|
||||
swiper: banner_three_thumb,
|
||||
},
|
||||
});
|
||||
function animated_swiper(selector, init) {
|
||||
let animated = function animated() {
|
||||
$(selector + ' [data-animation]').each(function() {
|
||||
let anim = $(this).data('animation');
|
||||
let delay = $(this).data('delay');
|
||||
let duration = $(this).data('duration');
|
||||
$(this).removeClass('anim' + anim).addClass(anim + ' animated').css({
|
||||
webkitAnimationDelay: delay,
|
||||
animationDelay: delay,
|
||||
webkitAnimationDuration: duration,
|
||||
animationDuration: duration
|
||||
}).one('animationend', function() {
|
||||
$(this).removeClass(anim + ' animated');
|
||||
});
|
||||
});
|
||||
};
|
||||
animated();
|
||||
init.on('slideChange', function() {
|
||||
$(sliderActive2 + ' [data-animation]').removeClass('animated');
|
||||
});
|
||||
init.on('slideChange', animated);
|
||||
}
|
||||
animated_swiper(sliderActive2, sliderInit2);
|
||||
|
||||
///============= * Dark & Light Switch =============\\\
|
||||
$('.switch__tab-open').on('click', function () {
|
||||
$(this).hide();
|
||||
$('.switch__tab-close').show();
|
||||
$('.switch__tab-icon').css('right', '260px');
|
||||
$('.switch__tab-area').css({
|
||||
'right': '0',
|
||||
});
|
||||
});
|
||||
$('.switch__tab-close').on('click', function () {
|
||||
$(this).hide();
|
||||
$('.switch__tab-open').show();
|
||||
$('.switch__tab-icon').css('right', '0');
|
||||
$('.switch__tab-area').css({
|
||||
'right': '-260px',
|
||||
});
|
||||
});
|
||||
$('.type-dark-mode button').on('click', function (e) {
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
var themeDark = $('.type-dark-mode button.active').attr('data-mode');
|
||||
if (themeDark == 'dark-mode') {
|
||||
$('body').addClass('dark-mode');
|
||||
}
|
||||
else {
|
||||
$('body').removeClass('dark-mode');
|
||||
}
|
||||
});
|
||||
|
||||
///============= * Custom Cursor =============\\\
|
||||
var ball = document.getElementById("cursor-ball");
|
||||
var cursorText = document.getElementById("cursor-text");
|
||||
var hoverAreas = document.querySelectorAll('.data_cursor');
|
||||
var lastHoveredElement = null;
|
||||
var mouseX = 0,
|
||||
mouseY = 0;
|
||||
var ballX = 0,
|
||||
ballY = 0;
|
||||
var speed = 0.1;
|
||||
function updateCursor() {
|
||||
ballX += (mouseX - ballX) * speed;
|
||||
ballY += (mouseY - ballY) * speed;
|
||||
ball.style.left = ballX + "px";
|
||||
ball.style.top = ballY + "px";
|
||||
cursorText.style.left = ballX + "px";
|
||||
cursorText.style.top = ballY + "px";
|
||||
if (lastHoveredElement === null) {
|
||||
ball.style.display = 'block';
|
||||
ball.style.height = "12px";
|
||||
ball.style.width = "12px";
|
||||
cursorText.style.opacity = '0';
|
||||
}
|
||||
requestAnimationFrame(updateCursor);
|
||||
}
|
||||
function handleMouseMove(e) {
|
||||
var scrollX = window.pageXOffset || document.documentElement.scrollLeft;
|
||||
var scrollY = window.pageYOffset || document.documentElement.scrollTop;
|
||||
mouseX = e.clientX + scrollX;
|
||||
mouseY = e.clientY + scrollY;
|
||||
}
|
||||
function handleHoverEnter(e) {
|
||||
cursorText.innerHTML = e.target.getAttribute('data-cursor-text');
|
||||
cursorText.style.opacity = '1';
|
||||
ball.style.height = "90px";
|
||||
ball.style.width = "90px";
|
||||
lastHoveredElement = e.target;
|
||||
}
|
||||
function handleHoverLeave(e) {
|
||||
cursorText.style.opacity = '0';
|
||||
ball.style.display = 'block';
|
||||
lastHoveredElement = null;
|
||||
}
|
||||
document.addEventListener('mousemove', handleMouseMove);
|
||||
hoverAreas.forEach(function(elem) {
|
||||
elem.addEventListener('mouseenter', handleHoverEnter);
|
||||
elem.addEventListener('mouseleave', handleHoverLeave);
|
||||
});
|
||||
updateCursor();
|
||||
$(document).ready(function () {
|
||||
toggleCursor($('#cursor_style button.active').data('cursor'));
|
||||
$('#cursor_style button').on('click', function () {
|
||||
$('#cursor_style button').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
toggleCursor($(this).data('cursor'));
|
||||
});
|
||||
function toggleCursor(value) {
|
||||
if (value == 2) {
|
||||
$('.hide').fadeOut();
|
||||
$('.cursor').removeClass('yes').addClass('no');
|
||||
} else {
|
||||
$('.hide').fadeIn();
|
||||
$('.cursor').removeClass('no').addClass('yes');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
///============= * Portfolio Filter =============\\\
|
||||
$(window).on('load', function(){
|
||||
var $grid = $('.gallery__area-active').isotope();
|
||||
$('.gallery__area-button').on('click', 'button', function () {
|
||||
var filterValue = $(this).attr('data-filter');
|
||||
$grid.isotope({
|
||||
filter: filterValue
|
||||
});
|
||||
});
|
||||
$('.gallery__area-button').on('click', 'button', function () {
|
||||
$(this).siblings('.active').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
})
|
||||
|
||||
///============= * Scroll To Top =============\\\
|
||||
var scrollPath = document.querySelector('.scroll-up path');
|
||||
var pathLength = scrollPath.getTotalLength();
|
||||
scrollPath.style.transition = scrollPath.style.WebkitTransition = 'none';
|
||||
scrollPath.style.strokeDasharray = pathLength + ' ' + pathLength;
|
||||
scrollPath.style.strokeDashoffset = pathLength;
|
||||
scrollPath.getBoundingClientRect();
|
||||
scrollPath.style.transition = scrollPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear';
|
||||
var updatescroll = function() {
|
||||
var scroll = $(window).scrollTop();
|
||||
var height = $(document).height() - $(window).height();
|
||||
var scroll = pathLength - (scroll * pathLength / height);
|
||||
scrollPath.style.strokeDashoffset = scroll;
|
||||
}
|
||||
updatescroll();
|
||||
$(window).scroll(updatescroll);
|
||||
var offset = 50;
|
||||
var duration = 950;
|
||||
jQuery(window).on('scroll', function() {
|
||||
if(jQuery(this).scrollTop() > offset) {
|
||||
jQuery('.scroll-up').addClass('active-scroll');
|
||||
} else {
|
||||
jQuery('.scroll-up').removeClass('active-scroll');
|
||||
}
|
||||
});
|
||||
jQuery('.scroll-up').on('click', function(event) {
|
||||
event.preventDefault();
|
||||
jQuery('html, body').animate({
|
||||
scrollTop: 0
|
||||
}, duration);
|
||||
return false;
|
||||
});
|
||||
|
||||
///============= * Register GSAP =============\\\
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
|
||||
gsap.config({
|
||||
nullTargetWarn: false,
|
||||
});
|
||||
///============= * Bounce Animation =============\\\
|
||||
gsap.set(".item_bounce", { opacity: 0, y: -100 });
|
||||
ScrollTrigger.batch(".item_bounce", {
|
||||
onEnter: (batch) => gsap.to(batch, {
|
||||
opacity: 1,
|
||||
y: 0,
|
||||
stagger: 0.4,
|
||||
duration: 1.5,
|
||||
ease: "bounce",
|
||||
}),
|
||||
start: 'top 90%',
|
||||
});
|
||||
///============= * Split Title =============\\\
|
||||
let des_anim_item_one = document.querySelectorAll(".title_split_anim");
|
||||
des_anim_item_one.forEach((des_anim_item) => {
|
||||
let data_duration = des_anim_item.getAttribute("data-duration") || 0.80;
|
||||
let data_delay = des_anim_item.getAttribute("data-delay") || 0.2;
|
||||
let translateX_value = des_anim_item.getAttribute("data-translateX") || 0;
|
||||
let translateY_value = des_anim_item.getAttribute("data-translateY") || 0;
|
||||
let onscroll_value = des_anim_item.getAttribute("data-on-scroll") || 1;
|
||||
let stagger_value = des_anim_item.getAttribute("data-stagger") || 0.06;
|
||||
let split_word = new SplitText(des_anim_item, { type: "chars, words" });
|
||||
let gsapConfig = {
|
||||
duration: data_duration,
|
||||
delay: data_delay,
|
||||
x: translateX_value || 20,
|
||||
y: translateY_value,
|
||||
autoAlpha: 0,
|
||||
stagger: stagger_value
|
||||
};
|
||||
if (onscroll_value == 1) {
|
||||
gsapConfig.scrollTrigger = {
|
||||
trigger: des_anim_item,
|
||||
start: 'top 90%'
|
||||
};
|
||||
}
|
||||
gsap.from(split_word.words, gsapConfig);
|
||||
});
|
||||
let des_anim_item = document.querySelectorAll(".title_split_anim");
|
||||
des_anim_item.forEach((des_anim_item) => {
|
||||
let stagger_value = des_anim_item.getAttribute("data-stagger") || 0.04;
|
||||
let translateX_value = des_anim_item.getAttribute("data-translateX") || 0;
|
||||
let translateY_value = des_anim_item.getAttribute("data-translateY") || 0;
|
||||
let onscroll_value = des_anim_item.getAttribute("data-on-scroll") || 1;
|
||||
let data_delay = des_anim_item.getAttribute("data-delay") || 0.1;
|
||||
let data_duration = des_anim_item.getAttribute("data-duration") || 0.75;
|
||||
let split_word = new SplitText(des_anim_item, { type: "chars, words" });
|
||||
let gsapConfig = {
|
||||
duration: data_duration,
|
||||
delay: data_delay,
|
||||
x: translateX_value || 20,
|
||||
y: translateY_value,
|
||||
autoAlpha: 0,
|
||||
stagger: stagger_value
|
||||
};
|
||||
if (onscroll_value == 1) {
|
||||
gsapConfig.scrollTrigger = {
|
||||
trigger: des_anim_item,
|
||||
start: 'top 90%'
|
||||
};
|
||||
}
|
||||
gsap.from(split_word.words, gsapConfig);
|
||||
});
|
||||
})(jQuery);
|
||||
11
public/web/assets/js/gsap.js
Normal file
11
public/web/assets/js/gsap.js
Normal file
File diff suppressed because one or more lines are too long
12
public/web/assets/js/isotope.pkgd.min.js
vendored
Normal file
12
public/web/assets/js/isotope.pkgd.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/web/assets/js/jquery-3.6.0.min.js
vendored
Normal file
2
public/web/assets/js/jquery-3.6.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/web/assets/js/jquery.counterup.min.js
vendored
Normal file
1
public/web/assets/js/jquery.counterup.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
(function($){"use strict";$.fn.counterUp=function(options){var settings=$.extend({time:400,delay:10,offset:100,beginAt:0,formatter:false,context:"window",callback:function(){}},options),s;return this.each(function(){var $this=$(this),counter={time:$(this).data("counterup-time")||settings.time,delay:$(this).data("counterup-delay")||settings.delay,offset:$(this).data("counterup-offset")||settings.offset,beginAt:$(this).data("counterup-beginat")||settings.beginAt,context:$(this).data("counterup-context")||settings.context};var counterUpper=function(){var nums=[];var divisions=counter.time/counter.delay;var num=$(this).attr("data-num")?$(this).attr("data-num"):$this.text();var isComma=/[0-9]+,[0-9]+/.test(num);num=num.replace(/,/g,"");var decimalPlaces=(num.split(".")[1]||[]).length;if(counter.beginAt>num)counter.beginAt=num;var isTime=/[0-9]+:[0-9]+:[0-9]+/.test(num);if(isTime){var times=num.split(":"),m=1;s=0;while(times.length>0){s+=m*parseInt(times.pop(),10);m*=60}}for(var i=divisions;i>=counter.beginAt/num*divisions;i--){var newNum=parseFloat(num/divisions*i).toFixed(decimalPlaces);if(isTime){newNum=parseInt(s/divisions*i);var hours=parseInt(newNum/3600)%24;var minutes=parseInt(newNum/60)%60;var seconds=parseInt(newNum%60,10);newNum=(hours<10?"0"+hours:hours)+":"+(minutes<10?"0"+minutes:minutes)+":"+(seconds<10?"0"+seconds:seconds)}if(isComma){while(/(\d+)(\d{3})/.test(newNum.toString())){newNum=newNum.toString().replace(/(\d+)(\d{3})/,"$1"+","+"$2")}}if(settings.formatter){newNum=settings.formatter.call(this,newNum)}nums.unshift(newNum)}$this.data("counterup-nums",nums);$this.text(counter.beginAt);var f=function(){if(!$this.data("counterup-nums")){settings.callback.call(this);return}$this.html($this.data("counterup-nums").shift());if($this.data("counterup-nums").length){setTimeout($this.data("counterup-func"),counter.delay)}else{$this.data("counterup-nums",null);$this.data("counterup-func",null);settings.callback.call(this)}};$this.data("counterup-func",f);setTimeout($this.data("counterup-func"),counter.delay)};$this.waypoint(function(direction){counterUpper();this.destroy()},{offset:counter.offset+"%",context:counter.context})})}})(jQuery);
|
||||
4
public/web/assets/js/jquery.magnific-popup.min.js
vendored
Normal file
4
public/web/assets/js/jquery.magnific-popup.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public/web/assets/js/jquery.waypoints.min.js
vendored
Normal file
7
public/web/assets/js/jquery.waypoints.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
public/web/assets/js/popper.min.js
vendored
Normal file
5
public/web/assets/js/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
151
public/web/assets/js/progressbar.min.js
vendored
Normal file
151
public/web/assets/js/progressbar.min.js
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* jQuery.appear
|
||||
* https://github.com/bas2k/jquery.appear/
|
||||
* http://code.google.com/p/jquery-appear/
|
||||
* http://bas2k.ru/
|
||||
*
|
||||
* Copyright (c) 2009 Michael Hixson
|
||||
* Copyright (c) 2012-2014 Alexander Brovikov
|
||||
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.appear = function (fn, options) {
|
||||
|
||||
var settings = $.extend({
|
||||
|
||||
//arbitrary data to pass to fn
|
||||
data: undefined,
|
||||
|
||||
//call fn only on the first appear?
|
||||
one: true,
|
||||
|
||||
// X & Y accuracy
|
||||
accX: 0,
|
||||
accY: 0
|
||||
|
||||
}, options);
|
||||
|
||||
return this.each(function () {
|
||||
|
||||
var t = $(this);
|
||||
|
||||
//whether the element is currently visible
|
||||
t.appeared = false;
|
||||
|
||||
if (!fn) {
|
||||
|
||||
//trigger the custom event
|
||||
t.trigger('appear', settings.data);
|
||||
return;
|
||||
}
|
||||
|
||||
var w = $(window);
|
||||
|
||||
//fires the appear event when appropriate
|
||||
var check = function () {
|
||||
|
||||
//is the element hidden?
|
||||
if (!t.is(':visible')) {
|
||||
|
||||
//it became hidden
|
||||
t.appeared = false;
|
||||
return;
|
||||
}
|
||||
|
||||
//is the element inside the visible window?
|
||||
var a = w.scrollLeft();
|
||||
var b = w.scrollTop();
|
||||
var o = t.offset();
|
||||
var x = o.left;
|
||||
var y = o.top;
|
||||
|
||||
var ax = settings.accX;
|
||||
var ay = settings.accY;
|
||||
var th = t.height();
|
||||
var wh = w.height();
|
||||
var tw = t.width();
|
||||
var ww = w.width();
|
||||
|
||||
if (y + th + ay >= b &&
|
||||
y <= b + wh + ay &&
|
||||
x + tw + ax >= a &&
|
||||
x <= a + ww + ax) {
|
||||
|
||||
//trigger the custom event
|
||||
if (!t.appeared) t.trigger('appear', settings.data);
|
||||
|
||||
} else {
|
||||
|
||||
//it scrolled out of view
|
||||
t.appeared = false;
|
||||
}
|
||||
};
|
||||
|
||||
//create a modified fn with some additional logic
|
||||
var modifiedFn = function () {
|
||||
|
||||
//mark the element as visible
|
||||
t.appeared = true;
|
||||
|
||||
//is this supposed to happen only once?
|
||||
if (settings.one) {
|
||||
|
||||
//remove the check
|
||||
w.unbind('scroll', check);
|
||||
var i = $.inArray(check, $.fn.appear.checks);
|
||||
if (i >= 0) $.fn.appear.checks.splice(i, 1);
|
||||
}
|
||||
|
||||
//trigger the original fn
|
||||
fn.apply(this, arguments);
|
||||
};
|
||||
|
||||
//bind the modified fn to the element
|
||||
if (settings.one) t.one('appear', settings.data, modifiedFn);
|
||||
else t.bind('appear', settings.data, modifiedFn);
|
||||
|
||||
//check whenever the window scrolls
|
||||
w.scroll(check);
|
||||
|
||||
//check whenever the dom changes
|
||||
$.fn.appear.checks.push(check);
|
||||
|
||||
//check now
|
||||
(check)();
|
||||
});
|
||||
};
|
||||
|
||||
//keep a queue of appearance checks
|
||||
$.extend($.fn.appear, {
|
||||
|
||||
checks: [],
|
||||
timeout: null,
|
||||
|
||||
//process the queue
|
||||
checkAll: function () {
|
||||
var length = $.fn.appear.checks.length;
|
||||
if (length > 0) while (length--) ($.fn.appear.checks[length])();
|
||||
},
|
||||
|
||||
//check the queue asynchronously
|
||||
run: function () {
|
||||
if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
|
||||
$.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);
|
||||
}
|
||||
});
|
||||
|
||||
//run checks when these methods are called
|
||||
$.each(['append', 'prepend', 'after', 'before', 'attr',
|
||||
'removeAttr', 'addClass', 'removeClass', 'toggleClass',
|
||||
'remove', 'css', 'show', 'hide'], function (i, n) {
|
||||
var old = $.fn[n];
|
||||
if (old) {
|
||||
$.fn[n] = function () {
|
||||
var r = old.apply(this, arguments);
|
||||
$.fn.appear.run();
|
||||
return r;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
11
public/web/assets/js/scroll-trigger.js
Normal file
11
public/web/assets/js/scroll-trigger.js
Normal file
File diff suppressed because one or more lines are too long
11
public/web/assets/js/split-text.js
Normal file
11
public/web/assets/js/split-text.js
Normal file
File diff suppressed because one or more lines are too long
1
public/web/assets/js/swiper-bundle.min.js
vendored
Normal file
1
public/web/assets/js/swiper-bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/web/assets/js/wow.min.js
vendored
Normal file
2
public/web/assets/js/wow.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user