first commit
This commit is contained in:
Vendored
+11
File diff suppressed because one or more lines are too long
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
/*!
|
||||
* ScrollToPlugin 3.11.4
|
||||
* https://greensock.com
|
||||
*
|
||||
* @license Copyright 2022, GreenSock. All rights reserved.
|
||||
* Subject to the terms at https://greensock.com/standard-license or for Club GreenSock members, the agreement issued with that membership.
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function l(){return"undefined"!=typeof window}function m(){return f||l()&&(f=window.gsap)&&f.registerPlugin&&f}function n(e){return"string"==typeof e}function o(e){return"function"==typeof e}function p(e,t){var o="x"===t?"Width":"Height",n="scroll"+o,l="client"+o;return e===T||e===i||e===c?Math.max(i[n],c[n])-(T["inner"+o]||i[l]||c[l]):e[n]-e["offset"+o]}function q(e,t){var o="scroll"+("x"===t?"Left":"Top");return e===T&&(null!=e.pageXOffset?o="page"+t.toUpperCase()+"Offset":e=null!=i[o]?i:c),function(){return e[o]}}function s(e,t){if(!(e=y(e)[0])||!e.getBoundingClientRect)return console.warn("scrollTo target doesn't exist. Using 0")||{x:0,y:0};var o=e.getBoundingClientRect(),n=!t||t===T||t===c,l=n?{top:i.clientTop-(T.pageYOffset||i.scrollTop||c.scrollTop||0),left:i.clientLeft-(T.pageXOffset||i.scrollLeft||c.scrollLeft||0)}:t.getBoundingClientRect(),r={x:o.left-l.left,y:o.top-l.top};return!n&&t&&(r.x+=q(t,"x")(),r.y+=q(t,"y")()),r}function t(e,t,o,l,r){return isNaN(e)||"object"==typeof e?n(e)&&"="===e.charAt(1)?parseFloat(e.substr(2))*("-"===e.charAt(0)?-1:1)+l-r:"max"===e?p(t,o)-r:Math.min(p(t,o),s(e,t)[o]-r):parseFloat(e)-r}function u(){f=m(),l()&&f&&"undefined"!=typeof document&&document.body&&(T=window,c=document.body,i=document.documentElement,y=f.utils.toArray,f.config({autoKillThreshold:7}),v=f.config(),a=1)}var f,a,T,i,c,y,v,h,r={version:"3.11.4",name:"scrollTo",rawVars:1,register:function register(e){f=e,u()},init:function init(e,l,r,s,i){a||u();var p=this,c=f.getProperty(e,"scrollSnapType");p.isWin=e===T,p.target=e,p.tween=r,l=function _clean(e,t,l,r){if(o(e)&&(e=e(t,l,r)),"object"!=typeof e)return n(e)&&"max"!==e&&"="!==e.charAt(1)?{x:e,y:e}:{y:e};if(e.nodeType)return{y:e,x:e};var s,i={};for(s in e)i[s]="onAutoKill"!==s&&o(e[s])?e[s](t,l,r):e[s];return i}(l,s,e,i),p.vars=l,p.autoKill=!!l.autoKill,p.getX=q(e,"x"),p.getY=q(e,"y"),p.x=p.xPrev=p.getX(),p.y=p.yPrev=p.getY(),h=h||f.core.globals().ScrollTrigger,"smooth"===f.getProperty(e,"scrollBehavior")&&f.set(e,{scrollBehavior:"auto"}),c&&"none"!==c&&(p.snap=1,p.snapInline=e.style.scrollSnapType,e.style.scrollSnapType="none"),null!=l.x?(p.add(p,"x",p.x,t(l.x,e,"x",p.x,l.offsetX||0),s,i),p._props.push("scrollTo_x")):p.skipX=1,null!=l.y?(p.add(p,"y",p.y,t(l.y,e,"y",p.y,l.offsetY||0),s,i),p._props.push("scrollTo_y")):p.skipY=1},render:function render(e,t){for(var o,n,l,r,s,i=t._pt,c=t.target,u=t.tween,f=t.autoKill,a=t.xPrev,y=t.yPrev,d=t.isWin,g=t.snap,x=t.snapInline;i;)i.r(e,i.d),i=i._next;o=d||!t.skipX?t.getX():a,l=(n=d||!t.skipY?t.getY():y)-y,r=o-a,s=v.autoKillThreshold,t.x<0&&(t.x=0),t.y<0&&(t.y=0),f&&(!t.skipX&&(s<r||r<-s)&&o<p(c,"x")&&(t.skipX=1),!t.skipY&&(s<l||l<-s)&&n<p(c,"y")&&(t.skipY=1),t.skipX&&t.skipY&&(u.kill(),t.vars.onAutoKill&&t.vars.onAutoKill.apply(u,t.vars.onAutoKillParams||[]))),d?T.scrollTo(t.skipX?o:t.x,t.skipY?n:t.y):(t.skipY||(c.scrollTop=t.y),t.skipX||(c.scrollLeft=t.x)),!g||1!==e&&0!==e||(n=c.scrollTop,o=c.scrollLeft,x?c.style.scrollSnapType=x:c.style.removeProperty("scroll-snap-type"),c.scrollTop=n+1,c.scrollLeft=o+1,c.scrollTop=n,c.scrollLeft=o),t.xPrev=t.x,t.yPrev=t.y,h&&h.update()},kill:function kill(e){var t="scrollTo"===e;!t&&"scrollTo_x"!==e||(this.skipX=1),!t&&"scrollTo_y"!==e||(this.skipY=1)}};r.max=p,r.getOffset=s,r.buildGetter=q,m()&&f.registerPlugin(r),e.ScrollToPlugin=r,e.default=r;if (typeof(window)==="undefined"||window!==e){Object.defineProperty(e,"__esModule",{value:!0})} else {delete e.default}});
|
||||
|
||||
Vendored
+11
File diff suppressed because one or more lines are too long
Vendored
+11
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+7
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.counterUp=t():e.counterUp=t()}(self,(function(){return(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>n,divideNumbers:()=>r});const n=(e,t={})=>{const{action:n="start",duration:i=1e3,delay:u=16}=t;if("stop"===n)return void o(e);if(o(e),!/[0-9]/.test(e.innerHTML))return;const l=r(e.innerHTML,{duration:i||e.getAttribute("data-duration"),delay:u||e.getAttribute("data-delay")});e._countUpOrigInnerHTML=e.innerHTML,e.innerHTML=l[0]||" ",e.style.visibility="visible";const c=function(){e.innerHTML=l.shift()||" ",l.length?(clearTimeout(e.countUpTimeout),e.countUpTimeout=setTimeout(c,u)):e._countUpOrigInnerHTML=void 0};e.countUpTimeout=setTimeout(c,u)},o=e=>{clearTimeout(e.countUpTimeout),e._countUpOrigInnerHTML&&(e.innerHTML=e._countUpOrigInnerHTML,e._countUpOrigInnerHTML=void 0),e.style.visibility=""},r=(e,t={})=>{const{duration:n=1e3,delay:o=16}=t,r=n/o,i=e.toString().split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/),u=[];for(let e=0;e<r;e++)u.push("");for(let e=0;e<i.length;e++)if(/([0-9.][,.0-9]*[0-9]*)/.test(i[e])&&!/<[^>]+>/.test(i[e])){let t=i[e];const n=[...t.matchAll(/[.,]/g)].map((e=>({char:e[0],i:t.length-e.index-1}))).sort(((e,t)=>e.i-t.i));t=t.replace(/[.,]/g,"");let o=u.length-1;for(let e=r;e>=1;e--){let i=parseInt(t/r*e,10);i=n.reduce(((e,{char:t,i:n})=>e.length<=n?e:e.slice(0,-n)+t+e.slice(-n)),i.toString()),u[o--]+=i}}else for(let t=0;t<r;t++)u[t]+=i[e];return u[u.length]=e.toString(),u};return t})()}));
|
||||
Vendored
+11
File diff suppressed because one or more lines are too long
Vendored
+7
File diff suppressed because one or more lines are too long
Vendored
+12
File diff suppressed because one or more lines are too long
Vendored
+2
File diff suppressed because one or more lines are too long
Vendored
+55
@@ -0,0 +1,55 @@
|
||||
/*!
|
||||
* jquery.counterup.js 1.0
|
||||
*
|
||||
* Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
|
||||
* Released under the GPL v2 License
|
||||
*
|
||||
* Date: Nov 26, 2013
|
||||
*/
|
||||
(function (e) {
|
||||
"use strict";
|
||||
e.fn.counterUp = function (t) {
|
||||
var n = e.extend({
|
||||
time: 400,
|
||||
delay: 10
|
||||
}, t);
|
||||
return this.each(function () {
|
||||
var t = e(this),
|
||||
r = n,
|
||||
i = function () {
|
||||
var e = [],
|
||||
n = r.time / r.delay,
|
||||
i = t.text(),
|
||||
s = /[0-9]+,[0-9]+/.test(i);
|
||||
i = i.replace(/,/g, "");
|
||||
var o = /^[0-9]+$/.test(i),
|
||||
u = /^[0-9]+\.[0-9]+$/.test(i),
|
||||
a = u ? (i.split(".")[1] || []).length : 0;
|
||||
for (var f = n; f >= 1; f--) {
|
||||
var l = parseInt(i / n * f);
|
||||
u && (l = parseFloat(i / n * f).toFixed(a));
|
||||
if (s)
|
||||
while (/(\d+)(\d{3})/.test(l.toString())) l = l.toString().replace(/(\d+)(\d{3})/, "$1,$2");
|
||||
e.unshift(l)
|
||||
}
|
||||
t.data("counterup-nums", e);
|
||||
t.text("0");
|
||||
var c = function () {
|
||||
t.text(t.data("counterup-nums").shift());
|
||||
if (t.data("counterup-nums").length) setTimeout(t.data("counterup-func"), r.delay);
|
||||
else {
|
||||
delete t.data("counterup-nums");
|
||||
t.data("counterup-nums", null);
|
||||
t.data("counterup-func", null)
|
||||
}
|
||||
};
|
||||
t.data("counterup-func", c);
|
||||
setTimeout(t.data("counterup-func"), r.delay)
|
||||
};
|
||||
t.waypoint(i, {
|
||||
offset: "100%",
|
||||
triggerOnce: !0
|
||||
})
|
||||
})
|
||||
}
|
||||
})(jQuery);
|
||||
+4
File diff suppressed because one or more lines are too long
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function($){"use strict";$.fn.meanmenu=function(e){var n={meanMenuTarget:jQuery(this),meanMenuContainer:"body",meanMenuClose:"X",meanMenuCloseSize:"18px",meanMenuOpen:"<span /><span /><span />",meanRevealPosition:"right",meanRevealPositionDistance:"0",meanRevealColour:"",meanScreenWidth:"480",meanNavPush:"",meanShowChildren:!0,meanExpandableChildren:!0,meanExpand:"+",meanContract:"-",meanRemoveAttrs:!1,onePage:!1,meanDisplay:"block",removeElements:""};e=$.extend(n,e);var a=window.innerWidth||document.documentElement.clientWidth;return this.each(function(){var n=e.meanMenuTarget,t=e.meanMenuContainer,r=e.meanMenuClose,i=e.meanMenuCloseSize,s=e.meanMenuOpen,u=e.meanRevealPosition,m=e.meanRevealPositionDistance,l=e.meanRevealColour,o=e.meanScreenWidth,c=e.meanNavPush,v=".meanmenu-reveal",h=e.meanShowChildren,d=e.meanExpandableChildren,y=e.meanExpand,j=e.meanContract,Q=e.meanRemoveAttrs,f=e.onePage,g=e.meanDisplay,p=e.removeElements,C=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/Blackberry/i)||navigator.userAgent.match(/Windows Phone/i))&&(C=!0),(navigator.userAgent.match(/MSIE 8/i)||navigator.userAgent.match(/MSIE 7/i))&&jQuery("html").css("overflow-y","scroll");var w="",x=function(){if("center"===u){var e=window.innerWidth||document.documentElement.clientWidth,n=e/2-22+"px";w="left:"+n+";right:auto;",C?jQuery(".meanmenu-reveal").animate({left:n}):jQuery(".meanmenu-reveal").css("left",n)}},A=!1,E=!1;"right"===u&&(w="right:"+m+";left:auto;"),"left"===u&&(w="left:"+m+";right:auto;"),x();var M="",P=function(){M.html(jQuery(M).is(".meanmenu-reveal.meanclose")?r:s)},W=function(){jQuery(".mean-bar,.mean-push").remove(),jQuery(t).removeClass("mean-container"),jQuery(n).css("display",g),A=!1,E=!1,jQuery(p).removeClass("mean-remove")},b=function(){var e="background:"+l+";color:"+l+";"+w;if(o>=a){jQuery(p).addClass("mean-remove"),E=!0,jQuery(t).addClass("mean-container"),jQuery(".mean-container").prepend('<div class="mean-bar"><a href="#nav" class="meanmenu-reveal" style="'+e+'">Show Navigation</a><nav class="mean-nav"></nav></div>');var r=jQuery(n).html();jQuery(".mean-nav").html(r),Q&&jQuery("nav.mean-nav ul, nav.mean-nav ul *").each(function(){jQuery(this).is(".mean-remove")?jQuery(this).attr("class","mean-remove"):jQuery(this).removeAttr("class"),jQuery(this).removeAttr("id")}),jQuery(n).before('<div class="mean-push" />'),jQuery(".mean-push").css("margin-top",c),jQuery(n).hide(),jQuery(".meanmenu-reveal").show(),jQuery(v).html(s),M=jQuery(v),jQuery(".mean-nav ul").hide(),h?d?(jQuery(".mean-nav ul ul").each(function(){jQuery(this).children().length&&jQuery(this,"li:first").parent().append('<a class="mean-expand" href="#" style="font-size: '+i+'">'+y+"</a>")}),jQuery(".mean-expand").on("click",function(e){e.preventDefault(),jQuery(this).hasClass("mean-clicked")?(jQuery(this).text(y),jQuery(this).prev("ul").slideUp(300,function(){})):(jQuery(this).text(j),jQuery(this).prev("ul").slideDown(300,function(){})),jQuery(this).toggleClass("mean-clicked")})):jQuery(".mean-nav ul ul").show():jQuery(".mean-nav ul ul").hide(),jQuery(".mean-nav ul li").last().addClass("mean-last"),M.removeClass("meanclose"),jQuery(M).click(function(e){e.preventDefault(),A===!1?(M.css("text-align","center"),M.css("text-indent","0"),M.css("font-size",i),jQuery(".mean-nav ul:first").slideDown(),A=!0):(jQuery(".mean-nav ul:first").slideUp(),A=!1),M.toggleClass("meanclose"),P(),jQuery(p).addClass("mean-remove")}),f&&jQuery(".mean-nav ul > li > a:first-child").on("click",function(){jQuery(".mean-nav ul:first").slideUp(),A=!1,jQuery(M).toggleClass("meanclose").html(s)})}else W()};C||jQuery(window).resize(function(){a=window.innerWidth||document.documentElement.clientWidth,a>o,W(),o>=a?(b(),x()):W()}),jQuery(window).resize(function(){a=window.innerWidth||document.documentElement.clientWidth,C?(x(),o>=a?E===!1&&b():W()):(W(),o>=a&&(b(),x()))}),b()})}}(jQuery);
|
||||
@@ -0,0 +1,506 @@
|
||||
/***************************************************
|
||||
==================== JS INDEX ======================
|
||||
****************************************************
|
||||
01. Preloader
|
||||
02. Go top Top
|
||||
03. Offcanvas Menu Control
|
||||
04. Header Search
|
||||
05. Header | Home One
|
||||
06. Header | Home Two
|
||||
07. Counter Activation
|
||||
08. Testimonial Slider | Home 1
|
||||
09. Testimonial Slider | Home 2
|
||||
10. Team Slider
|
||||
11. MixitUp activation
|
||||
12. WOW JS Activation
|
||||
13. Mobile Menu Activation
|
||||
14. ProgressBar activation
|
||||
15. Banner Slider
|
||||
|
||||
|
||||
|
||||
****************************************************/
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 01. Preloader
|
||||
var preloader = document.querySelector("#preloader");
|
||||
var get_body = document.querySelector("body");
|
||||
|
||||
get_body.onload = function () {
|
||||
preloader.style.display = "none";
|
||||
};
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 02. Go top Top
|
||||
let scroll_top = document.getElementById("scroll_top");
|
||||
|
||||
if (scroll_top) {
|
||||
window.onscroll = function () { scrollTopFunc() };
|
||||
|
||||
function scrollTopFunc() {
|
||||
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
||||
scroll_top.classList.add('showed');
|
||||
} else {
|
||||
scroll_top.classList.remove('showed');
|
||||
}
|
||||
}
|
||||
|
||||
scroll_top.addEventListener('click', function () {
|
||||
document.body.scrollTop = 0;
|
||||
document.documentElement.scrollTop = 0;
|
||||
});
|
||||
}
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 03. Offcanvas Menu Control
|
||||
$('.menu_icon').on('click', function () {
|
||||
$('.offcanvas__area').addClass('showed');
|
||||
});
|
||||
|
||||
$('#offcanvas_close').on('click', function () {
|
||||
$('.offcanvas__area').removeClass('showed');
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 04. Header Search
|
||||
$('.search-icon').on('click', function () {
|
||||
$(this).hide();
|
||||
$('.search-close').show();
|
||||
$('.search__form').addClass('showed');
|
||||
});
|
||||
|
||||
$('.search-close').on('click', function () {
|
||||
$(this).hide();
|
||||
$('.search-icon').show();
|
||||
$('.search__form').removeClass('showed');
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 06.
|
||||
var share_btn = document.querySelectorAll('.share-btn');
|
||||
var social_share = document.querySelectorAll('.social-share');
|
||||
|
||||
for (let i = 0; i < share_btn.length; i++) {
|
||||
share_btn[i].addEventListener('click', function () {
|
||||
social_share[i].classList.toggle('active');
|
||||
});
|
||||
|
||||
}
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 06. Magnific Popup Activate
|
||||
$('.popup-link').magnificPopup({ type: 'iframe' });
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 07. Counter Activation
|
||||
const counter_1 = window.counterUp.default
|
||||
const counter_cb = entries => {
|
||||
|
||||
entries.forEach(entry => {
|
||||
const el = entry.target
|
||||
if (entry.isIntersecting && !el.classList.contains('is-visible')) {
|
||||
counter_1(el, {
|
||||
duration: 1500,
|
||||
delay: 16,
|
||||
})
|
||||
el.classList.add('is-visible')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const counter_1_io = new IntersectionObserver(counter_cb, {
|
||||
threshold: 1
|
||||
})
|
||||
|
||||
const counter_1_els = document.querySelectorAll('.counter_fast');
|
||||
counter_1_els.forEach((el) => {
|
||||
counter_1_io.observe(el)
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 07. Counter Activation
|
||||
const counter_2 = window.counterUp.default
|
||||
const counter_cb_2 = entries => {
|
||||
|
||||
entries.forEach(entry => {
|
||||
const el = entry.target
|
||||
if (entry.isIntersecting && !el.classList.contains('is-visible')) {
|
||||
counter_2(el, {
|
||||
duration: 3000,
|
||||
delay: 16,
|
||||
})
|
||||
el.classList.add('is-visible')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const counter_2_io = new IntersectionObserver(counter_cb_2, {
|
||||
threshold: 1
|
||||
})
|
||||
|
||||
const counter_2_els = document.querySelectorAll('.counter_medium');
|
||||
counter_2_els.forEach((el) => {
|
||||
counter_2_io.observe(el)
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 07. Counter Activation
|
||||
const counter_3 = window.counterUp.default
|
||||
const counter_cb_3 = entries => {
|
||||
|
||||
entries.forEach(entry => {
|
||||
const el = entry.target
|
||||
if (entry.isIntersecting && !el.classList.contains('is-visible')) {
|
||||
counter_3(el, {
|
||||
duration: 5000,
|
||||
delay: 16,
|
||||
})
|
||||
el.classList.add('is-visible')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const counter_3_io = new IntersectionObserver(counter_cb_3, {
|
||||
threshold: 1
|
||||
})
|
||||
|
||||
const counter_3_els = document.querySelectorAll('.counter_slow');
|
||||
counter_3_els.forEach((el) => {
|
||||
counter_3_io.observe(el)
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// Progress Bar Activate
|
||||
$('.skill_active').progressBar({
|
||||
height: "10",
|
||||
animation: true,
|
||||
barColor: "#B69974",
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
AOS.init({
|
||||
once: true,
|
||||
offset: 200,
|
||||
duration: 1000,
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 10. Text Slider
|
||||
var text_slider = new Swiper(".textslider__active", {
|
||||
loop: true,
|
||||
speed: 7000,
|
||||
spaceBetween: 0,
|
||||
autoplay: {
|
||||
delay: 1,
|
||||
},
|
||||
breakpoints: {
|
||||
640: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1024: {
|
||||
slidesPerView: 4,
|
||||
},
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 15. Text Slider
|
||||
var text_slider_2 = new Swiper(".textslider__active-2", {
|
||||
loop: true,
|
||||
speed: 3000,
|
||||
spaceBetween: 30,
|
||||
slidesPerView: 'auto',
|
||||
autoplay: {
|
||||
delay: 1,
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 10. Text Slider
|
||||
var text_slider = new Swiper(".textslider__active-3", {
|
||||
spaceBetween: 0,
|
||||
centeredSlides: true,
|
||||
speed: 7000,
|
||||
autoplay: {
|
||||
delay: 1,
|
||||
reverseDirection: true
|
||||
},
|
||||
loop: true,
|
||||
loopedSlides: 4,
|
||||
slidesPerView:'auto',
|
||||
allowTouchMove: false,
|
||||
disableOnInteraction: true,
|
||||
breakpoints: {
|
||||
640: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1024: {
|
||||
slidesPerView: 4,
|
||||
},
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 15. Text Slider down
|
||||
var text_slider_2 = new Swiper(".textslider__down-2", {
|
||||
loop: true,
|
||||
speed: 3000,
|
||||
spaceBetween: 30,
|
||||
autoplay: {
|
||||
delay: 1,
|
||||
},
|
||||
breakpoints: {
|
||||
640: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1024: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1200: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 11.
|
||||
var brand_slider = new Swiper(".brand__slider", {
|
||||
loop: true,
|
||||
speed: 3000,
|
||||
spaceBetween: 50,
|
||||
autoplay: {
|
||||
delay: 1,
|
||||
},
|
||||
breakpoints: {
|
||||
640: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1024: {
|
||||
slidesPerView: 4,
|
||||
},
|
||||
1400: {
|
||||
slidesPerView: 6,
|
||||
},
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 12.
|
||||
var testimonial_slider_3 = new Swiper(".testimonial__slider-3", {
|
||||
loop: true,
|
||||
speed: 3000,
|
||||
spaceBetween: 50,
|
||||
slidesPerView: 1,
|
||||
autoplay: {
|
||||
delay: 1500,
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 13. Mobile Menu Activation
|
||||
$('.offcanvas-menu').meanmenu({
|
||||
meanScreenWidth: "1365",
|
||||
meanMenuContainer: '.offcanvas__menu',
|
||||
meanMenuCloseSize: '24px',
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 14.
|
||||
var team_slider_3 = new Swiper(".team__slider-3", {
|
||||
loop: true,
|
||||
speed: 3000,
|
||||
spaceBetween: 30,
|
||||
breakpoints: {
|
||||
640: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1000: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
1300: {
|
||||
slidesPerView: 4,
|
||||
},
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// 14.
|
||||
var portfolio_slider_4 = new Swiper(".portfolio__slider-4", {
|
||||
loop: true,
|
||||
speed: 3000,
|
||||
spaceBetween: 30,
|
||||
breakpoints: {
|
||||
640: {
|
||||
slidesPerView: 1,
|
||||
},
|
||||
768: {
|
||||
slidesPerView: 2,
|
||||
},
|
||||
1000: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
1300: {
|
||||
slidesPerView: 3,
|
||||
},
|
||||
},
|
||||
});
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger, ScrollSmoother, TweenMax);
|
||||
|
||||
let device_width = window.innerWidth;
|
||||
|
||||
let skewSetter = gsap.quickTo(".portfolio__item-5 img", "skewY"),
|
||||
clamp = gsap.utils.clamp(-15, 15);
|
||||
const smoother = ScrollSmoother.create({
|
||||
smooth: 1.35,
|
||||
effects: device_width < 1025 ? false : true,
|
||||
smoothTouch: false,
|
||||
normalizeScroll: false,
|
||||
ignoreMobileResize: true,
|
||||
onUpdate: self => skewSetter(clamp(self.getVelocity() / -80)),
|
||||
onStop: () => skewSetter(0)
|
||||
});
|
||||
|
||||
|
||||
// P Animation
|
||||
let pAnimationLines = gsap.utils.toArray(".p-animation p");
|
||||
|
||||
pAnimationLines.forEach(pAnimationLine => {
|
||||
const tl = gsap.timeline({
|
||||
scrollTrigger: {
|
||||
trigger: pAnimationLine,
|
||||
start: 'top 90%',
|
||||
duration: 2,
|
||||
end: 'bottom 60%',
|
||||
scrub: false,
|
||||
markers: false,
|
||||
toggleActions: 'play none none none'
|
||||
}
|
||||
});
|
||||
|
||||
const pSplitLine = new SplitText(pAnimationLine, { type: "lines" });
|
||||
gsap.set(pAnimationLine, { perspective: 400 });
|
||||
pSplitLine.split({ type: "lines" })
|
||||
tl.from(pSplitLine.lines, {
|
||||
duration: 1,
|
||||
delay: 0.3,
|
||||
opacity: 0,
|
||||
x: 50,
|
||||
force3D: true,
|
||||
transformOrigin: "top center -50",
|
||||
stagger: 0.1
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// 25. Title Animation
|
||||
let headingAnimationLines = gsap.utils.toArray(".heading-animation");
|
||||
|
||||
headingAnimationLines.forEach(headingAnimationLine => {
|
||||
const tl = gsap.timeline({
|
||||
scrollTrigger: {
|
||||
trigger: headingAnimationLine,
|
||||
start: 'top 90%',
|
||||
end: 'bottom 60%',
|
||||
scrub: false,
|
||||
markers: false,
|
||||
toggleActions: 'play none none none'
|
||||
}
|
||||
});
|
||||
|
||||
const headingSplitLine = new SplitText(headingAnimationLine, { type: "words" });
|
||||
gsap.set(headingAnimationLine, { perspective: 400 });
|
||||
headingSplitLine.split({ type: "words" })
|
||||
tl.from(headingSplitLine.words, {
|
||||
duration: 1,
|
||||
delay: 0.3,
|
||||
opacity: 0,
|
||||
rotationX: -50,
|
||||
force3D: true,
|
||||
transformOrigin: "top center -50",
|
||||
stagger: 0.1,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Home 3 Hero shape animaton
|
||||
|
||||
let home3HeroShape = gsap.timeline();
|
||||
|
||||
home3HeroShape.from(".hero__title-3-wrap .line", {
|
||||
xPercent: -100,
|
||||
duration: 1,
|
||||
}, '+=1');
|
||||
|
||||
if ($('#hero_video').length){
|
||||
// Hero Video
|
||||
var hero_video = document.querySelector('.hero__video');
|
||||
var hero_video_icon = document.querySelector('#hero_video');
|
||||
|
||||
hero_video_icon.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
hero_video.classList.toggle('show');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,111 @@
|
||||
(function($) {
|
||||
|
||||
jQuery.fn.progressBar = function( options ) {
|
||||
|
||||
//Default values for progress_bar
|
||||
var defaults = {
|
||||
height : "30",
|
||||
backgroundColor : "#E0E0E0",
|
||||
barColor : "#F97352",
|
||||
targetBarColor : "#CCC",
|
||||
percentage : true,
|
||||
shadow : false,
|
||||
border : false,
|
||||
animation : false,
|
||||
animateTarget : false,
|
||||
};
|
||||
|
||||
var settings = $.extend( {}, defaults, options );
|
||||
|
||||
return this.each( function() {
|
||||
var elem = $( this );
|
||||
$.fn.replaceProgressBar( elem, settings );
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.replaceProgressBar = function( item, settings ) {
|
||||
var skill = item.text();
|
||||
var progress = item.data( 'width' );
|
||||
var target = item.data ( 'target' );
|
||||
var bar_classes = ' ';
|
||||
var animation_class = '';
|
||||
var bar_styles = 'background-color:' + settings.backgroundColor + ';height:' + settings.height + 'px;';
|
||||
if ( settings.shadow ) { bar_classes += 'shadow'; }
|
||||
if ( settings.border ) { bar_classes += ' border'; }
|
||||
if ( settings.animation ) { animation_class = ' animate'; }
|
||||
|
||||
var overlay = '<div class="sonny_progressbar' + animation_class + '" data-width="' + progress + '">';
|
||||
overlay += '<p class="title">' + skill + '</p>';
|
||||
overlay += '<div class="bar-container' + bar_classes + '" style="' + bar_styles + '">';
|
||||
|
||||
// Render the progress bar background
|
||||
overlay += '<span class="backgroundBar"></span>';
|
||||
|
||||
// Display target bar only if set
|
||||
if ( target ) {
|
||||
if ( settings.animateTarget ) {
|
||||
overlay += '<span class="targetBar loader" style="width:' + target + '%;background-color:' + settings.targetBarColor + ';"></span>';
|
||||
}
|
||||
else {
|
||||
overlay += '<span class="targetBar" style="width:' + target + '%;background-color:' + settings.targetBarColor + ';"></span>';
|
||||
}
|
||||
}
|
||||
|
||||
// Render the progress bar
|
||||
if ( settings.animation ) {
|
||||
overlay += '<span class="bar" style="background-color:' + settings.barColor + ';"></span>';
|
||||
}
|
||||
else {
|
||||
overlay += '<span class="bar" style="width:' + progress + '%;background-color:' + settings.barColor + ';"></span>';
|
||||
}
|
||||
|
||||
// Render the percentage if enabled
|
||||
if ( settings.percentage ) {
|
||||
overlay += '<span class="progress-percent" style="line-height:' + settings.height + 'px;">' + progress + '%</span>';
|
||||
}
|
||||
|
||||
// End
|
||||
overlay += '</div></div>';
|
||||
|
||||
// Render the progress bar on the page
|
||||
$( item ).replaceWith( overlay );
|
||||
|
||||
};
|
||||
|
||||
var animate = function() {
|
||||
|
||||
var doc_height = $(window).height();
|
||||
|
||||
$( '.sonny_progressbar.animate' ).each( function() {
|
||||
var position = $( this ).offset().top;
|
||||
|
||||
if ( ( $(window).scrollTop() + doc_height - 60 ) > position ) {
|
||||
var progress = $( this ).data( 'width' ) + "%";
|
||||
|
||||
$( this ).removeClass( 'animate' );
|
||||
$( this ).find( '.bar' ).css('opacity', '0.1');
|
||||
|
||||
$( this ).find( '.bar' ).animate({
|
||||
width : progress,
|
||||
opacity : 1
|
||||
}, 3000 );
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
// Looking for an animation element in the view
|
||||
$(window).scroll(function() {
|
||||
|
||||
if ( $( '.sonny_progressbar.animate' ).length < 1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If there is an animate element visible on the page, trigger the animation
|
||||
animate();
|
||||
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
Vendored
+14
File diff suppressed because one or more lines are too long
Vendored
+19
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user