Starter code added
This commit is contained in:
Vendored
+7
File diff suppressed because one or more lines are too long
@@ -0,0 +1,492 @@
|
||||
(function ($) {
|
||||
"use strict";
|
||||
$(document).ready(function () {
|
||||
|
||||
/*
|
||||
Jquery Mobile Menu
|
||||
============================*/
|
||||
$('#main-menu').meanmenu({
|
||||
meanMenuContainer: '.te-mobile-nav-menu',
|
||||
meanScreenWidth: "991",
|
||||
meanExpand: ['<i class="fal fa-plus"></i>'],
|
||||
});
|
||||
|
||||
/*
|
||||
Jquery Header Search
|
||||
============================*/
|
||||
$('.te-search-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('body').css('overflow', 'hidden');
|
||||
|
||||
$('.te-search-form-wrapper').addClass('te-active');
|
||||
});
|
||||
$('.te-search-close').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
$('body').css('overflow', 'auto');
|
||||
$('.te-search-form-wrapper').removeClass('te-active');
|
||||
});
|
||||
|
||||
window.onclick = function(e){
|
||||
if( e.target.matches(".te-search-form-wrapper") ){
|
||||
$('.te-search-form-wrapper').removeClass('te-active');
|
||||
}
|
||||
}
|
||||
/*
|
||||
Jquery sidebar Toggle
|
||||
============================*/
|
||||
$(".te-mobile-menu-toggle-btn").on("click", function () {
|
||||
$(".te-menu-sidebar-area").addClass("active");
|
||||
$(".te-body-overlay").addClass("active");
|
||||
});
|
||||
$(".te-menu-sidebar-close-btn").on("click", function () {
|
||||
$(".te-menu-sidebar-area").removeClass("active");
|
||||
$(".te-body-overlay").removeClass("active");
|
||||
});
|
||||
|
||||
/*
|
||||
Jquery Body Overlay
|
||||
============================*/
|
||||
$(".te-body-overlay").on("click", function () {
|
||||
$(".te-menu-sidebar-area").removeClass("active");
|
||||
$(".te-body-overlay").removeClass("active");
|
||||
});
|
||||
/*
|
||||
Stikey Js
|
||||
============================*/
|
||||
|
||||
const body = document.body;
|
||||
const html = document.documentElement;
|
||||
const height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
|
||||
if (100 < $(window).scrollTop()) {
|
||||
$(".te-header-menu-area.te-sticky-header").addClass("te-sticky_menu");
|
||||
}
|
||||
if( height > 1400 ) {
|
||||
const nav = $(".te-header-menu-area.te-sticky-header");
|
||||
let scrolled = false;
|
||||
$(window).scroll(function () {
|
||||
if (100 < $(window).scrollTop() && !scrolled) {
|
||||
nav
|
||||
.addClass("te-sticky_menu animated fadeIn")
|
||||
.animate({"margin-top": "0px"});
|
||||
scrolled = true;
|
||||
}
|
||||
if (100 > $(window).scrollTop() && scrolled) {
|
||||
nav.removeClass("te-sticky_menu animated fadeIn").css("margin-top", "0px");
|
||||
scrolled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
Jquery Empty Post Content Hide
|
||||
============================*/
|
||||
$('.blog-area .te-post-content p').filter(function() {
|
||||
return /\u00A0/.test($(this).text());
|
||||
}).hide();
|
||||
|
||||
/*
|
||||
Skill Progress Bar Js
|
||||
============================*/
|
||||
$('.skill-progressbar').one('inview', function(event, isInView) {
|
||||
if (isInView) {
|
||||
$('.progress-inner').each(function() {
|
||||
$(this).find('.progress-content').animate({
|
||||
width:$(this).attr('data-percentage')
|
||||
},2000);
|
||||
|
||||
$(this).find('.progress-number-count').animate(
|
||||
{left:$(this).attr('data-percentage')},
|
||||
{
|
||||
duration: 2000,
|
||||
step: function(now) {
|
||||
let data = Math.round(now);
|
||||
$(this).find('.progress-percent').html(data + '%');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
Slider
|
||||
============================*/
|
||||
$(".slider-wrapper").slick({
|
||||
slidesToShow: 1,
|
||||
infinite: true,
|
||||
autoplay: false,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: true,
|
||||
speed: 1500,
|
||||
prevArrow:
|
||||
"<button type='button' class='slider-arrow-btn prev-btn'><i class='fa-solid fa-angle-left'></i></button>",
|
||||
nextArrow:
|
||||
"<button type='button' class='slider-arrow-btn next-btn'><i class='fa-solid fa-angle-right'></i></button>",
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 767,
|
||||
settings: {
|
||||
autoplay: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
/*
|
||||
Info Card Slider
|
||||
============================*/
|
||||
$("#info_card_slider_wrapper").slick({
|
||||
slidesToShow: 3,
|
||||
infinite: true,
|
||||
autoplay: true,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: false,
|
||||
speed: 1500,
|
||||
prevArrow:
|
||||
"<button type='button' class='te-info-card-arrow-btn prev-btn'><i class='fa-solid fa-angle-left'></i></button>",
|
||||
nextArrow:
|
||||
"<button type='button' class='te-info-card-arrow-btn next-btn'><i class='fa-solid fa-angle-right'></i></button>",
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
/*
|
||||
Team Slider
|
||||
============================*/
|
||||
$("#team_slider_wrapper").slick({
|
||||
slidesToShow: 4,
|
||||
infinite: true,
|
||||
autoplay: true,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: false,
|
||||
speed: 1500,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 768,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
$('#team_slider_prev').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.slick-prev').trigger('click');
|
||||
});
|
||||
$('#team_slider_next').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.slick-next').trigger('click');
|
||||
});
|
||||
/*
|
||||
Testimonial Slider
|
||||
============================*/
|
||||
$("#home3_testimonial").slick({
|
||||
slidesToShow: 2,
|
||||
infinite: true,
|
||||
autoplay: true,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: true,
|
||||
speed: 1500,
|
||||
prevArrow:
|
||||
"<button type='button' class='testimonial-arrow-btn prev-btn'><i class='fa-solid fa-angle-left'></i></button>",
|
||||
nextArrow:
|
||||
"<button type='button' class='testimonial-arrow-btn next-btn'><i class='fa-solid fa-angle-right'></i></button>",
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1023,
|
||||
settings: {
|
||||
autoplay: true,
|
||||
slidesToShow: 1,
|
||||
},
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
Testimonial Slider
|
||||
============================*/
|
||||
$("#testimonial_one").slick({
|
||||
slidesToShow: 3,
|
||||
infinite: true,
|
||||
autoplay: false,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: false,
|
||||
speed: 1500,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
autoplay: true,
|
||||
slidesToShow: 1,
|
||||
},
|
||||
}
|
||||
],
|
||||
});
|
||||
$('#testimonial_slider_prev').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.slick-prev').trigger('click');
|
||||
});
|
||||
$('#testimonial_slider_next').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.slick-next').trigger('click');
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
Testimonial Slider Two
|
||||
============================*/
|
||||
$("#testimonial_two").slick({
|
||||
slidesToShow: 2,
|
||||
infinite: true,
|
||||
autoplay: false,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: false,
|
||||
speed: 1500,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
autoplay: true,
|
||||
slidesToShow: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
autoplay: true,
|
||||
slidesToShow: 1,
|
||||
},
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
$('#testimonial_slider_prev').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.slick-prev').trigger('click');
|
||||
});
|
||||
$('#testimonial_slider_next').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$('.slick-next').trigger('click');
|
||||
});
|
||||
|
||||
/*
|
||||
Related Portfolio Slider
|
||||
============================*/
|
||||
$("#related_portfolio").slick({
|
||||
slidesToShow: 3,
|
||||
infinite: true,
|
||||
autoplay: true,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: false,
|
||||
speed: 1500,
|
||||
prevArrow:
|
||||
"<button type='button' class='portfolio-arrow-btn prev-btn'><i class='fa-solid fa-angle-left'></i></button>",
|
||||
nextArrow:
|
||||
"<button type='button' class='portfolio-arrow-btn next-btn'><i class='fa-solid fa-angle-right'></i></button>",
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 767,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 460,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
Post Gallery Slider
|
||||
============================*/
|
||||
$(".post-gallery").slick({
|
||||
slidesToShow: 1,
|
||||
infinite: true,
|
||||
autoplay: true,
|
||||
draggable: true,
|
||||
arrows: true,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: false,
|
||||
speed: 300,
|
||||
prevArrow:
|
||||
"<button type='button' class='post-gallery-btn prev-btn'><i class='fa fa-arrow-left'></i></button>",
|
||||
nextArrow:
|
||||
"<button type='button' class='post-gallery-btn next-btn'><i class='fa fa-arrow-right'></i></button>",
|
||||
});
|
||||
|
||||
/*
|
||||
Client Logo Slider
|
||||
============================*/
|
||||
$(".client-logo-slider-wrapper").slick({
|
||||
slidesToShow: 5,
|
||||
infinite: true,
|
||||
autoplay: true,
|
||||
draggable: true,
|
||||
arrows: false,
|
||||
slidesToScroll: 1,
|
||||
loop: true,
|
||||
dots: false,
|
||||
speed: 1500,
|
||||
prevArrow:
|
||||
"<button type='button' class='post-gallery-btn prev-btn'><i class='fa fa-arrow-left'></i></button>",
|
||||
nextArrow:
|
||||
"<button type='button' class='post-gallery-btn next-btn'><i class='fa fa-arrow-right'></i></button>",
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1200,
|
||||
settings: {
|
||||
slidesToShow: 4,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 992,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 991,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 767,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
breakpoint: 460,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
/*
|
||||
Counter Js
|
||||
============================*/
|
||||
$(".counter").counterUp({
|
||||
delay: 10,
|
||||
time: 1000,
|
||||
});
|
||||
|
||||
/*
|
||||
Magnific Popup
|
||||
============================*/
|
||||
$(".video-play").magnificPopup({
|
||||
disableOn: 700,
|
||||
type: "iframe",
|
||||
mainClass: "mfp-fade",
|
||||
removalDelay: 160,
|
||||
preloader: false,
|
||||
fixedContentPos: false,
|
||||
});
|
||||
|
||||
/*
|
||||
Jquery Wow Js
|
||||
============================*/
|
||||
// new WOW().init();
|
||||
if ($('.wow').length) {
|
||||
var wow = new WOW(
|
||||
{
|
||||
boxClass: 'wow', // animated element css class (default is wow)
|
||||
animateClass: 'animated', // animation css class (default is animated)
|
||||
offset: 0, // distance to the element when triggering the animation (default is 0)
|
||||
mobile: false, // trigger animations on mobile devices (default is true)
|
||||
live: true // act on asynchronously loaded content (default is true)
|
||||
}
|
||||
);
|
||||
wow.init();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Jquery Nice Select Js
|
||||
============================*/
|
||||
$('select.select_option, select.wpcf7-select').niceSelect();
|
||||
|
||||
|
||||
/*
|
||||
Portfolio Isotope Js
|
||||
============================*/
|
||||
$('.te-portfolio-filter').on( 'click', 'li', function() {
|
||||
$("li").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
var filterValue = $(this).attr('data-filter');
|
||||
$grid.isotope({ filter: filterValue });
|
||||
});
|
||||
var $grid = $('.te-portfolio-isotope-wrapper').isotope({
|
||||
itemSelector: '.te-single-isotop',
|
||||
percentPosition: true,
|
||||
masonry: {
|
||||
columnWidth: '.te-single-isotop'
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
Jquery Tilt Js
|
||||
============================*/
|
||||
$('.tilt-animate').tilt({
|
||||
maxTilt: 12,
|
||||
perspective: 1500,
|
||||
})
|
||||
/*
|
||||
Preeloader
|
||||
============================*/
|
||||
$(window).on("load", function () {
|
||||
$("#preloader").fadeOut();
|
||||
$("#preloader-status").delay(200).fadeOut("slow");
|
||||
$("body").delay(200).css({"overflow-x": "hidden"});
|
||||
});
|
||||
|
||||
});
|
||||
})(jQuery);
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function(t){function e(){var e,i,n={height:a.innerHeight,width:a.innerWidth};return n.height||(e=r.compatMode,(e||!t.support.boxModel)&&(i="CSS1Compat"===e?f:r.body,n={height:i.clientHeight,width:i.clientWidth})),n}function i(){return{top:a.pageYOffset||f.scrollTop||r.body.scrollTop,left:a.pageXOffset||f.scrollLeft||r.body.scrollLeft}}function n(){var n,l=t(),r=0;if(t.each(d,function(t,e){var i=e.data.selector,n=e.$element;l=l.add(i?n.find(i):n)}),n=l.length)for(o=o||e(),h=h||i();n>r;r++)if(t.contains(f,l[r])){var a,c,p,s=t(l[r]),u={height:s.height(),width:s.width()},g=s.offset(),v=s.data("inview");if(!h||!o)return;g.top+u.height>h.top&&g.top<h.top+o.height&&g.left+u.width>h.left&&g.left<h.left+o.width?(a=h.left>g.left?"right":h.left+o.width<g.left+u.width?"left":"both",c=h.top>g.top?"bottom":h.top+o.height<g.top+u.height?"top":"both",p=a+"-"+c,v&&v===p||s.data("inview",p).trigger("inview",[!0,a,c])):v&&s.data("inview",!1).trigger("inview",[!1])}}var o,h,l,d={},r=document,a=window,f=r.documentElement,c=t.expando;t.event.special.inview={add:function(e){d[e.guid+"-"+this[c]]={data:e,$element:t(this)},l||t.isEmptyObject(d)||(l=setInterval(n,250))},remove:function(e){try{delete d[e.guid+"-"+this[c]]}catch(i){}t.isEmptyObject(d)&&(clearInterval(l),l=null)}},t(a).bind("scroll resize scrollstop",function(){o=h=null}),!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){h=null})}(jQuery);
|
||||
Vendored
+12
File diff suppressed because one or more lines are too long
+87
@@ -0,0 +1,87 @@
|
||||
/*!
|
||||
* jquery.counterup.js 1.0
|
||||
*
|
||||
* Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
|
||||
* Released under the GPL v2 License
|
||||
*
|
||||
* Date: Nov 26, 2013
|
||||
*/
|
||||
(function( $ ){
|
||||
"use strict";
|
||||
|
||||
$.fn.counterUp = function( options ) {
|
||||
|
||||
// Defaults
|
||||
var settings = $.extend({
|
||||
'time': 400,
|
||||
'delay': 10
|
||||
}, options);
|
||||
|
||||
return this.each(function(){
|
||||
|
||||
// Store the object
|
||||
var $this = $(this);
|
||||
var $settings = settings;
|
||||
|
||||
var counterUpper = function() {
|
||||
var nums = [];
|
||||
var divisions = $settings.time / $settings.delay;
|
||||
var num = $this.text();
|
||||
var isComma = /[0-9]+,[0-9]+/.test(num);
|
||||
num = num.replace(/,/g, '');
|
||||
var isInt = /^[0-9]+$/.test(num);
|
||||
var isFloat = /^[0-9]+\.[0-9]+$/.test(num);
|
||||
var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0;
|
||||
|
||||
// Generate list of incremental numbers to display
|
||||
for (var i = divisions; i >= 1; i--) {
|
||||
|
||||
// Preserve as int if input was int
|
||||
var newNum = parseInt(num / divisions * i);
|
||||
|
||||
// Preserve float if input was float
|
||||
if (isFloat) {
|
||||
newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces);
|
||||
}
|
||||
|
||||
// Preserve commas if input had commas
|
||||
if (isComma) {
|
||||
while (/(\d+)(\d{3})/.test(newNum.toString())) {
|
||||
newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2');
|
||||
}
|
||||
}
|
||||
|
||||
nums.unshift(newNum);
|
||||
}
|
||||
|
||||
$this.data('counterup-nums', nums);
|
||||
$this.text('0');
|
||||
|
||||
// Updates the number until we're done
|
||||
// Updates the number until we're done
|
||||
var f = function () {
|
||||
if (!$this.data('counterup-nums')) {
|
||||
return;
|
||||
}
|
||||
$this.text($this.data('counterup-nums').shift());
|
||||
if ($this.data('counterup-nums').length) {
|
||||
setTimeout($this.data('counterup-func'), $settings.delay);
|
||||
} else {
|
||||
delete $this.data('counterup-nums');
|
||||
$this.data('counterup-nums', null);
|
||||
$this.data('counterup-func', null);
|
||||
}
|
||||
};
|
||||
$this.data('counterup-func', f);
|
||||
|
||||
// Start the count up
|
||||
setTimeout($this.data('counterup-func'), $settings.delay);
|
||||
};
|
||||
|
||||
// Perform counts when the element gets into view
|
||||
$this.waypoint(counterUpper, { offset: '100%', triggerOnce: true });
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})( jQuery );
|
||||
File diff suppressed because one or more lines are too long
+6
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* jQuery meanMenu v2.0.8
|
||||
* @Copyright (C) 2012-2014 Chris Wharton @ MeanThemes (https://github.com/meanthemes/meanMenu)
|
||||
*
|
||||
*/
|
||||
!function(e){"use strict";e.fn.meanmenu=function(n){var a={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,meanRemoveAttrs:!1,onePage:!1,meanDisplay:"block",removeElements:""};n=e.extend(a,n);var t=window.innerWidth||document.documentElement.clientWidth;return this.each(function(){var e=n.meanMenuTarget,a=n.meanMenuContainer,r=n.meanMenuClose,i=n.meanMenuCloseSize,s=n.meanMenuOpen,u=n.meanRevealPosition,m=n.meanRevealPositionDistance,l=n.meanRevealColour,o=n.meanScreenWidth,c=n.meanNavPush,d=n.meanShowChildren,v=n.meanExpandableChildren,h=n.meanExpand,y=n.meanRemoveAttrs,j=n.onePage,Q=n.meanDisplay,f=n.removeElements,p=!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))&&(p=!0),(navigator.userAgent.match(/MSIE 8/i)||navigator.userAgent.match(/MSIE 7/i))&&jQuery("html").css("overflow-y","scroll");var g="",C=function(){if("center"===u){var e=(window.innerWidth||document.documentElement.clientWidth)/2-22+"px";g="left:"+e+";right:auto;",p?jQuery(".meanmenu-reveal").animate({left:e}):jQuery(".meanmenu-reveal").css("left",e)}},w=!1,A=!1;"right"===u&&(g="right:"+m+";left:auto;"),"left"===u&&(g="left:"+m+";right:auto;"),C();var M="",P=function(){jQuery(".mean-bar,.mean-push").remove(),jQuery(a).removeClass("mean-container"),jQuery(e).css("display",Q),w=!1,A=!1,jQuery(f).removeClass("mean-remove")},E=function(){var n="background:"+l+";color:"+l+";"+g;if(t<=o){jQuery(f).addClass("mean-remove"),A=!0,jQuery(a).addClass("mean-container"),jQuery(".mean-container").prepend('<div class="mean-bar"><a href="#nav" class="meanmenu-reveal" style="'+n+'">Show Navigation</a><nav class="mean-nav"></nav></div>');var u=jQuery(e).html();jQuery(".mean-nav").html(u),y&&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(e).before('<div class="mean-push" />'),jQuery(".mean-push").css("margin-top",c),jQuery(e).hide(),jQuery(".meanmenu-reveal").show(),jQuery(".meanmenu-reveal").html(s),M=jQuery(".meanmenu-reveal"),jQuery(".mean-nav ul").hide(),d?v?(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+'">'+h+"</a>")}),jQuery(".mean-expand").on("click",function(e){e.preventDefault(),jQuery(this).hasClass("mean-clicked")?(jQuery(this).prev("ul").slideUp(300,function(){}),jQuery(this).parent().removeClass("dropdown-opened")):(jQuery(this).prev("ul").slideDown(300,function(){}),jQuery(this).parent().addClass("dropdown-opened")),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(),!1===w?(M.css("text-align","center"),M.css("text-indent","0"),M.css("font-size",i),jQuery(".mean-nav ul:first").slideDown(),w=!0):(jQuery(".mean-nav ul:first").slideUp(),w=!1),M.toggleClass("meanclose"),jQuery(M).is(".meanmenu-reveal.meanclose")?M.html(r):M.html(s),jQuery(f).addClass("mean-remove")}),j&&jQuery(".mean-nav ul > li > a:first-child").on("click",function(){jQuery(".mean-nav ul:first").slideUp(),w=!1,jQuery(M).toggleClass("meanclose").html(s)})}else P()};p||jQuery(window).resize(function(){t=window.innerWidth||document.documentElement.clientWidth,P(),t<=o?(E(),C()):P()}),jQuery(window).resize(function(){t=window.innerWidth||document.documentElement.clientWidth,p?(C(),t<=o?!1===A&&E():P()):(P(),t<=o&&(E(),C()))}),E()})}}(jQuery);
|
||||
Vendored
+4
File diff suppressed because one or more lines are too long
+4
@@ -0,0 +1,4 @@
|
||||
/* jQuery Nice Select - v1.0
|
||||
https://github.com/hernansartorio/jquery-nice-select
|
||||
Made by Hernán Sartorio */
|
||||
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
|
||||
@@ -0,0 +1,25 @@
|
||||
// Avoid `console` errors in browsers that lack a console.
|
||||
(function() {
|
||||
var method;
|
||||
var noop = function () {};
|
||||
var methods = [
|
||||
'assert', 'clear', 'count', 'tilt', 'debug', 'dir', 'dirxml', 'error',
|
||||
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
|
||||
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
|
||||
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
|
||||
];
|
||||
var length = methods.length;
|
||||
var console = (window.console = window.console || {});
|
||||
|
||||
while (length--) {
|
||||
method = methods[length];
|
||||
|
||||
// Only stub undefined methods.
|
||||
if (!console[method]) {
|
||||
console[method] = noop;
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
// Place any jQuery/helper plugins in here.
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function(s){"use strict";s(".switch").on("click",(function(){s("body").hasClass("light")?(s("body").removeClass("light"),s(".switch").removeClass("switched")):(s("body").addClass("light"),s(".switch").addClass("switched"))})),s(document).ready((function(){var e=document.querySelector(".progress-wrap path"),t=e.getTotalLength();e.style.transition=e.style.WebkitTransition="none",e.style.strokeDasharray=t+" "+t,e.style.strokeDashoffset=t,e.getBoundingClientRect(),e.style.transition=e.style.WebkitTransition="stroke-dashoffset 10ms linear";var o=function(){var o=s(window).scrollTop(),r=s(document).height()-s(window).height(),i=t-o*t/r;e.style.strokeDashoffset=i};o(),s(window).scroll(o);jQuery(window).on("scroll",(function(){jQuery(this).scrollTop()>50?jQuery(".progress-wrap").addClass("active-progress"):jQuery(".progress-wrap").removeClass("active-progress")})),jQuery(".progress-wrap").on("click",(function(s){return s.preventDefault(),jQuery("html, body").animate({scrollTop:0},550),!1}))}))}(jQuery);
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,315 @@
|
||||
'use strict';
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports) {
|
||||
// Node/CommonJS
|
||||
module.exports = function (root, jQuery) {
|
||||
if (jQuery === undefined) {
|
||||
// require('jQuery') returns a factory that requires window to
|
||||
// build a jQuery instance, we normalize how we use modules
|
||||
// that require this pattern but the window provided is a noop
|
||||
// if it's defined (how jquery works)
|
||||
if (typeof window !== 'undefined') {
|
||||
jQuery = require('jquery');
|
||||
} else {
|
||||
jQuery = require('jquery')(root);
|
||||
}
|
||||
}
|
||||
factory(jQuery);
|
||||
return jQuery;
|
||||
};
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
})(function ($) {
|
||||
$.fn.tilt = function (options) {
|
||||
|
||||
/**
|
||||
* RequestAnimationFrame
|
||||
*/
|
||||
var requestTick = function requestTick() {
|
||||
if (this.ticking) return;
|
||||
requestAnimationFrame(updateTransforms.bind(this));
|
||||
this.ticking = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Bind mouse movement evens on instance
|
||||
*/
|
||||
var bindEvents = function bindEvents() {
|
||||
var _this = this;
|
||||
$(this).on('mousemove', mouseMove);
|
||||
$(this).on('mouseenter', mouseEnter);
|
||||
if (this.settings.reset) $(this).on('mouseleave', mouseLeave);
|
||||
if (this.settings.glare) $(window).on('resize', updateGlareSize.bind(_this));
|
||||
};
|
||||
|
||||
/**
|
||||
* Set transition only on mouse leave and mouse enter so it doesn't influence mouse move transforms
|
||||
*/
|
||||
var setTransition = function setTransition() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this.timeout !== undefined) clearTimeout(this.timeout);
|
||||
$(this).css({ 'transition': this.settings.speed + 'ms ' + this.settings.easing });
|
||||
if (this.settings.glare) this.glareElement.css({ 'transition': 'opacity ' + this.settings.speed + 'ms ' + this.settings.easing });
|
||||
this.timeout = setTimeout(function () {
|
||||
$(_this2).css({ 'transition': '' });
|
||||
if (_this2.settings.glare) _this2.glareElement.css({ 'transition': '' });
|
||||
}, this.settings.speed);
|
||||
};
|
||||
|
||||
/**
|
||||
* When user mouse enters tilt element
|
||||
*/
|
||||
var mouseEnter = function mouseEnter(event) {
|
||||
this.ticking = false;
|
||||
$(this).css({ 'will-change': 'transform' });
|
||||
setTransition.call(this);
|
||||
|
||||
// Trigger change event
|
||||
$(this).trigger("tilt.mouseEnter");
|
||||
};
|
||||
|
||||
/**
|
||||
* Return the x,y position of the mouse on the tilt element
|
||||
* @returns {{x: *, y: *}}
|
||||
*/
|
||||
var getMousePositions = function getMousePositions(event) {
|
||||
if (typeof event === "undefined") {
|
||||
event = {
|
||||
pageX: $(this).offset().left + $(this).outerWidth() / 2,
|
||||
pageY: $(this).offset().top + $(this).outerHeight() / 2
|
||||
};
|
||||
}
|
||||
return { x: event.pageX, y: event.pageY };
|
||||
};
|
||||
|
||||
/**
|
||||
* When user mouse moves over the tilt element
|
||||
*/
|
||||
var mouseMove = function mouseMove(event) {
|
||||
this.mousePositions = getMousePositions(event);
|
||||
requestTick.call(this);
|
||||
};
|
||||
|
||||
/**
|
||||
* When user mouse leaves tilt element
|
||||
*/
|
||||
var mouseLeave = function mouseLeave() {
|
||||
setTransition.call(this);
|
||||
this.reset = true;
|
||||
requestTick.call(this);
|
||||
|
||||
// Trigger change event
|
||||
$(this).trigger("tilt.mouseLeave");
|
||||
};
|
||||
|
||||
/**
|
||||
* Get tilt values
|
||||
*
|
||||
* @returns {{x: tilt value, y: tilt value}}
|
||||
*/
|
||||
var getValues = function getValues() {
|
||||
var width = $(this).outerWidth();
|
||||
var height = $(this).outerHeight();
|
||||
var left = $(this).offset().left;
|
||||
var top = $(this).offset().top;
|
||||
|
||||
try {
|
||||
const percentageX = (this.mousePositions.x - left) / width;
|
||||
const percentageY = (this.mousePositions.y - top) / height;
|
||||
// x or y position inside instance / width of instance = percentage of position inside instance * the max tilt value
|
||||
const tiltX = ((this.settings.maxTilt / 2) - ((percentageX) * this.settings.maxTilt)).toFixed(2);
|
||||
const tiltY = (((percentageY) * this.settings.maxTilt) - (this.settings.maxTilt / 2)).toFixed(2);
|
||||
// angle
|
||||
const angle = Math.atan2(this.mousePositions.x - (left+width/2),- (this.mousePositions.y - (top+height/2)) )*(180/Math.PI);
|
||||
// Return x & y tilt values
|
||||
return {tiltX, tiltY, 'percentageX': percentageX * 100, 'percentageY': percentageY * 100, angle};
|
||||
} catch(e){}
|
||||
};
|
||||
|
||||
/**
|
||||
* Update tilt transforms on mousemove
|
||||
*/
|
||||
var updateTransforms = function updateTransforms() {
|
||||
this.transforms = getValues.call(this);
|
||||
|
||||
if (this.reset) {
|
||||
this.reset = false;
|
||||
$(this).css('transform', 'perspective(' + this.settings.perspective + 'px) rotateX(0deg) rotateY(0deg)');
|
||||
|
||||
// Rotate glare if enabled
|
||||
if (this.settings.glare) {
|
||||
this.glareElement.css('transform', 'rotate(180deg) translate(-50%, -50%)');
|
||||
this.glareElement.css('opacity', '0');
|
||||
}
|
||||
|
||||
return;
|
||||
} else {
|
||||
$(this).css('transform', 'perspective(' + this.settings.perspective + 'px) rotateX(' + (this.settings.disableAxis === 'x' ? 0 : this.transforms.tiltY) + 'deg) rotateY(' + (this.settings.disableAxis === 'y' ? 0 : this.transforms.tiltX) + 'deg) scale3d(' + this.settings.scale + ',' + this.settings.scale + ',' + this.settings.scale + ')');
|
||||
|
||||
// Rotate glare if enabled
|
||||
if (this.settings.glare) {
|
||||
this.glareElement.css('transform', 'rotate(' + this.transforms.angle + 'deg) translate(-50%, -50%)');
|
||||
this.glareElement.css('opacity', '' + this.transforms.percentageY * this.settings.maxGlare / 100);
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger change event
|
||||
$(this).trigger("change", [this.transforms]);
|
||||
|
||||
this.ticking = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Prepare elements
|
||||
*/
|
||||
var prepareGlare = function prepareGlare() {
|
||||
var glarePrerender = this.settings.glarePrerender;
|
||||
|
||||
// If option pre-render is enabled we assume all html/css is present for an optimal glare effect.
|
||||
if (!glarePrerender)
|
||||
// Create glare element
|
||||
$(this).append('<div class="js-tilt-glare"><div class="js-tilt-glare-inner"></div></div>');
|
||||
|
||||
// Store glare selector if glare is enabled
|
||||
this.glareElementWrapper = $(this).find(".js-tilt-glare");
|
||||
this.glareElement = $(this).find(".js-tilt-glare-inner");
|
||||
|
||||
// Remember? We assume all css is already set, so just return
|
||||
if (glarePrerender) return;
|
||||
|
||||
// Abstracted re-usable glare styles
|
||||
var stretch = {
|
||||
'position': 'absolute',
|
||||
'top': '0',
|
||||
'left': '0',
|
||||
'width': '100%',
|
||||
'height': '100%'
|
||||
};
|
||||
|
||||
// Style glare wrapper
|
||||
this.glareElementWrapper.css(stretch).css({
|
||||
'overflow': 'hidden',
|
||||
'pointer-events': 'none'
|
||||
});
|
||||
|
||||
// Style glare element
|
||||
this.glareElement.css({
|
||||
'position': 'absolute',
|
||||
'top': '50%',
|
||||
'left': '50%',
|
||||
'background-image': 'linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)',
|
||||
'width': '' + $(this).outerWidth() * 2,
|
||||
'height': '' + $(this).outerWidth() * 2,
|
||||
'transform': 'rotate(180deg) translate(-50%, -50%)',
|
||||
'transform-origin': '0% 0%',
|
||||
'opacity': '0'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Update glare on resize
|
||||
*/
|
||||
var updateGlareSize = function updateGlareSize() {
|
||||
this.glareElement.css({
|
||||
'width': '' + $(this).outerWidth() * 2,
|
||||
'height': '' + $(this).outerWidth() * 2
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Public methods
|
||||
*/
|
||||
$.fn.tilt.destroy = function () {
|
||||
$(this).each(function () {
|
||||
$(this).find('.js-tilt-glare').remove();
|
||||
$(this).css({ 'will-change': '', 'transform': '' });
|
||||
$(this).off('mousemove mouseenter mouseleave');
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.tilt.getValues = function () {
|
||||
var results = [];
|
||||
$(this).each(function () {
|
||||
this.mousePositions = getMousePositions.call(this);
|
||||
results.push(getValues.call(this));
|
||||
});
|
||||
return results;
|
||||
};
|
||||
|
||||
$.fn.tilt.reset = function () {
|
||||
$(this).each(function () {
|
||||
var _this3 = this;
|
||||
|
||||
this.mousePositions = getMousePositions.call(this);
|
||||
this.settings = $(this).data('settings');
|
||||
mouseLeave.call(this);
|
||||
setTimeout(function () {
|
||||
_this3.reset = false;
|
||||
}, this.settings.transition);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Loop every instance
|
||||
*/
|
||||
return this.each(function () {
|
||||
var _this4 = this;
|
||||
|
||||
/**
|
||||
* Default settings merged with user settings
|
||||
* Can be set trough data attributes or as parameter.
|
||||
* @type {*}
|
||||
*/
|
||||
this.settings = $.extend({
|
||||
maxTilt: $(this).is('[data-tilt-max]') ? $(this).data('tilt-max') : 20,
|
||||
perspective: $(this).is('[data-tilt-perspective]') ? $(this).data('tilt-perspective') : 300,
|
||||
easing: $(this).is('[data-tilt-easing]') ? $(this).data('tilt-easing') : 'cubic-bezier(.03,.98,.52,.99)',
|
||||
scale: $(this).is('[data-tilt-scale]') ? $(this).data('tilt-scale') : '1',
|
||||
speed: $(this).is('[data-tilt-speed]') ? $(this).data('tilt-speed') : '400',
|
||||
transition: $(this).is('[data-tilt-transition]') ? $(this).data('tilt-transition') : true,
|
||||
disableAxis: $(this).is('[data-tilt-disable-axis]') ? $(this).data('tilt-disable-axis') : null,
|
||||
axis: $(this).is('[data-tilt-axis]') ? $(this).data('tilt-axis') : null,
|
||||
reset: $(this).is('[data-tilt-reset]') ? $(this).data('tilt-reset') : true,
|
||||
glare: $(this).is('[data-tilt-glare]') ? $(this).data('tilt-glare') : false,
|
||||
maxGlare: $(this).is('[data-tilt-maxglare]') ? $(this).data('tilt-maxglare') : 1
|
||||
}, options);
|
||||
|
||||
// Add deprecation warning & set disableAxis to deprecated axis setting
|
||||
if (this.settings.axis !== null) {
|
||||
console.warn('Tilt.js: the axis setting has been renamed to disableAxis. See https://github.com/gijsroge/tilt.js/pull/26 for more information');
|
||||
this.settings.disableAxis = this.settings.axis;
|
||||
}
|
||||
|
||||
this.init = function () {
|
||||
// Store settings
|
||||
$(_this4).data('settings', _this4.settings);
|
||||
|
||||
// Prepare element
|
||||
if (_this4.settings.glare) prepareGlare.call(_this4);
|
||||
|
||||
// Bind events
|
||||
bindEvents.call(_this4);
|
||||
};
|
||||
|
||||
// Init
|
||||
this.init();
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Auto load
|
||||
*/
|
||||
$('[data-tilt]').tilt();
|
||||
|
||||
return true;
|
||||
});
|
||||
//# sourceMappingURL=tilt.jquery.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user