Refactor for flask
This commit is contained in:
7
Public/js/bootstrap.min.js
vendored
7
Public/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,49 +0,0 @@
|
||||
|
||||
var google;
|
||||
|
||||
function init() {
|
||||
// Basic options for a simple Google Map
|
||||
// For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
|
||||
// var myLatlng = new google.maps.LatLng(40.71751, -73.990922);
|
||||
var myLatlng = new google.maps.LatLng(40.69847032728747, -73.9514422416687);
|
||||
// 39.399872
|
||||
// -8.224454
|
||||
|
||||
var mapOptions = {
|
||||
// How zoomed in you want the map to start at (always required)
|
||||
zoom: 7,
|
||||
|
||||
// The latitude and longitude to center the map (always required)
|
||||
center: myLatlng,
|
||||
|
||||
// How you would like to style the map.
|
||||
scrollwheel: false,
|
||||
styles: [{"featureType":"administrative.land_parcel","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"landscape.man_made","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels","stylers":[{"visibility":"simplified"},{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"hue":"#f49935"}]},{"featureType":"road.highway","elementType":"labels","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"hue":"#fad959"}]},{"featureType":"road.arterial","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"visibility":"simplified"}]},{"featureType":"road.local","elementType":"labels","stylers":[{"visibility":"simplified"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"hue":"#a1cdfc"},{"saturation":30},{"lightness":49}]}]
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Get the HTML DOM element that will contain your map
|
||||
// We are using a div with id="map" seen below in the <body>
|
||||
var mapElement = document.getElementById('map');
|
||||
|
||||
// Create the Google Map using out element and options defined above
|
||||
var map = new google.maps.Map(mapElement, mapOptions);
|
||||
|
||||
var addresses = ['Brooklyn'];
|
||||
|
||||
for (var x = 0; x < addresses.length; x++) {
|
||||
$.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+addresses[x]+'&sensor=false', null, function (data) {
|
||||
var p = data.results[0].geometry.location
|
||||
var latlng = new google.maps.LatLng(p.lat, p.lng);
|
||||
new google.maps.Marker({
|
||||
position: latlng,
|
||||
map: map,
|
||||
icon: 'images/loc.png'
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
google.maps.event.addDomListener(window, 'load', init);
|
||||
@@ -1,130 +0,0 @@
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
var CountTo = function (element, options) {
|
||||
this.$element = $(element);
|
||||
this.options = $.extend({}, CountTo.DEFAULTS, this.dataOptions(), options);
|
||||
this.init();
|
||||
};
|
||||
|
||||
CountTo.DEFAULTS = {
|
||||
from: 0, // the number the element should start at
|
||||
to: 0, // the number the element should end at
|
||||
speed: 1000, // how long it should take to count between the target numbers
|
||||
refreshInterval: 100, // how often the element should be updated
|
||||
decimals: 0, // the number of decimal places to show
|
||||
formatter: formatter, // handler for formatting the value before rendering
|
||||
onUpdate: null, // callback method for every time the element is updated
|
||||
onComplete: null // callback method for when the element finishes updating
|
||||
};
|
||||
|
||||
CountTo.prototype.init = function () {
|
||||
this.value = this.options.from;
|
||||
this.loops = Math.ceil(this.options.speed / this.options.refreshInterval);
|
||||
this.loopCount = 0;
|
||||
this.increment = (this.options.to - this.options.from) / this.loops;
|
||||
};
|
||||
|
||||
CountTo.prototype.dataOptions = function () {
|
||||
var options = {
|
||||
from: this.$element.data('from'),
|
||||
to: this.$element.data('to'),
|
||||
speed: this.$element.data('speed'),
|
||||
refreshInterval: this.$element.data('refresh-interval'),
|
||||
decimals: this.$element.data('decimals')
|
||||
};
|
||||
|
||||
var keys = Object.keys(options);
|
||||
|
||||
for (var i in keys) {
|
||||
var key = keys[i];
|
||||
|
||||
if (typeof(options[key]) === 'undefined') {
|
||||
delete options[key];
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
CountTo.prototype.update = function () {
|
||||
this.value += this.increment;
|
||||
this.loopCount++;
|
||||
|
||||
this.render();
|
||||
|
||||
if (typeof(this.options.onUpdate) == 'function') {
|
||||
this.options.onUpdate.call(this.$element, this.value);
|
||||
}
|
||||
|
||||
if (this.loopCount >= this.loops) {
|
||||
clearInterval(this.interval);
|
||||
this.value = this.options.to;
|
||||
|
||||
if (typeof(this.options.onComplete) == 'function') {
|
||||
this.options.onComplete.call(this.$element, this.value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CountTo.prototype.render = function () {
|
||||
var formattedValue = this.options.formatter.call(this.$element, this.value, this.options);
|
||||
this.$element.text(formattedValue);
|
||||
};
|
||||
|
||||
CountTo.prototype.restart = function () {
|
||||
this.stop();
|
||||
this.init();
|
||||
this.start();
|
||||
};
|
||||
|
||||
CountTo.prototype.start = function () {
|
||||
this.stop();
|
||||
this.render();
|
||||
this.interval = setInterval(this.update.bind(this), this.options.refreshInterval);
|
||||
};
|
||||
|
||||
CountTo.prototype.stop = function () {
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval);
|
||||
}
|
||||
};
|
||||
|
||||
CountTo.prototype.toggle = function () {
|
||||
if (this.interval) {
|
||||
this.stop();
|
||||
} else {
|
||||
this.start();
|
||||
}
|
||||
};
|
||||
|
||||
function formatter(value, options) {
|
||||
return value.toFixed(options.decimals);
|
||||
}
|
||||
|
||||
$.fn.countTo = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data('countTo');
|
||||
var init = !data || typeof(option) === 'object';
|
||||
var options = typeof(option) === 'object' ? option : {};
|
||||
var method = typeof(option) === 'string' ? option : 'start';
|
||||
|
||||
if (init) {
|
||||
if (data) data.stop();
|
||||
$this.data('countTo', data = new CountTo(this, options));
|
||||
}
|
||||
|
||||
data[method].call(data);
|
||||
});
|
||||
};
|
||||
}));
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
||||
|
||||
jQuery.extend( jQuery.easing,
|
||||
{
|
||||
def: 'easeOutQuad',
|
||||
swing: function (x, t, b, c, d) {
|
||||
//alert(jQuery.easing.default);
|
||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
||||
},
|
||||
easeInQuad: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t + b;
|
||||
},
|
||||
easeOutQuad: function (x, t, b, c, d) {
|
||||
return -c *(t/=d)*(t-2) + b;
|
||||
},
|
||||
easeInOutQuad: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t + b;
|
||||
return -c/2 * ((--t)*(t-2) - 1) + b;
|
||||
},
|
||||
easeInCubic: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t + b;
|
||||
},
|
||||
easeOutCubic: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t + 1) + b;
|
||||
},
|
||||
easeInOutCubic: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t + 2) + b;
|
||||
},
|
||||
easeInQuart: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t + b;
|
||||
},
|
||||
easeOutQuart: function (x, t, b, c, d) {
|
||||
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
||||
},
|
||||
easeInOutQuart: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
||||
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
||||
},
|
||||
easeInQuint: function (x, t, b, c, d) {
|
||||
return c*(t/=d)*t*t*t*t + b;
|
||||
},
|
||||
easeOutQuint: function (x, t, b, c, d) {
|
||||
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
||||
},
|
||||
easeInOutQuint: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
||||
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
||||
},
|
||||
easeInSine: function (x, t, b, c, d) {
|
||||
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
||||
},
|
||||
easeOutSine: function (x, t, b, c, d) {
|
||||
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
||||
},
|
||||
easeInOutSine: function (x, t, b, c, d) {
|
||||
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
||||
},
|
||||
easeInExpo: function (x, t, b, c, d) {
|
||||
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
||||
},
|
||||
easeOutExpo: function (x, t, b, c, d) {
|
||||
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
||||
},
|
||||
easeInOutExpo: function (x, t, b, c, d) {
|
||||
if (t==0) return b;
|
||||
if (t==d) return b+c;
|
||||
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
||||
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
||||
},
|
||||
easeInCirc: function (x, t, b, c, d) {
|
||||
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
||||
},
|
||||
easeOutCirc: function (x, t, b, c, d) {
|
||||
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
||||
},
|
||||
easeInOutCirc: function (x, t, b, c, d) {
|
||||
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
||||
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
||||
},
|
||||
easeInElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
},
|
||||
easeOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
||||
},
|
||||
easeInOutElastic: function (x, t, b, c, d) {
|
||||
var s=1.70158;var p=0;var a=c;
|
||||
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
||||
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
||||
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
||||
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
||||
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
||||
},
|
||||
easeInBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*(t/=d)*t*((s+1)*t - s) + b;
|
||||
},
|
||||
easeOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
easeInBounce: function (x, t, b, c, d) {
|
||||
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
||||
},
|
||||
easeOutBounce: function (x, t, b, c, d) {
|
||||
if ((t/=d) < (1/2.75)) {
|
||||
return c*(7.5625*t*t) + b;
|
||||
} else if (t < (2/2.75)) {
|
||||
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
||||
} else if (t < (2.5/2.75)) {
|
||||
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
||||
} else {
|
||||
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
||||
}
|
||||
},
|
||||
easeInOutBounce: function (x, t, b, c, d) {
|
||||
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
||||
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
5
Public/js/jquery.flexslider-min.js
vendored
5
Public/js/jquery.flexslider-min.js
vendored
File diff suppressed because one or more lines are too long
5
Public/js/jquery.min.js
vendored
5
Public/js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
7
Public/js/jquery.waypoints.min.js
vendored
7
Public/js/jquery.waypoints.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,310 +0,0 @@
|
||||
;(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
|
||||
var isMobile = {
|
||||
Android: function() {
|
||||
return navigator.userAgent.match(/Android/i);
|
||||
},
|
||||
BlackBerry: function() {
|
||||
return navigator.userAgent.match(/BlackBerry/i);
|
||||
},
|
||||
iOS: function() {
|
||||
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
|
||||
},
|
||||
Opera: function() {
|
||||
return navigator.userAgent.match(/Opera Mini/i);
|
||||
},
|
||||
Windows: function() {
|
||||
return navigator.userAgent.match(/IEMobile/i);
|
||||
},
|
||||
any: function() {
|
||||
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
|
||||
}
|
||||
};
|
||||
|
||||
var fullHeight = function() {
|
||||
|
||||
if ( !isMobile.any() ) {
|
||||
$('.js-fullheight').css('height', $(window).height());
|
||||
$(window).resize(function(){
|
||||
$('.js-fullheight').css('height', $(window).height());
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
var counter = function() {
|
||||
$('.js-counter').countTo({
|
||||
formatter: function (value, options) {
|
||||
return value.toFixed(options.decimals);
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
var counterWayPoint = function() {
|
||||
if ($('#colorlib-counter').length > 0 ) {
|
||||
$('#colorlib-counter').waypoint( function( direction ) {
|
||||
|
||||
if( direction === 'down' && !$(this.element).hasClass('animated') ) {
|
||||
setTimeout( counter , 400);
|
||||
$(this.element).addClass('animated');
|
||||
}
|
||||
} , { offset: '90%' } );
|
||||
}
|
||||
};
|
||||
|
||||
// Animations
|
||||
var contentWayPoint = function() {
|
||||
var i = 0;
|
||||
$('.animate-box').waypoint( function( direction ) {
|
||||
|
||||
if( direction === 'down' && !$(this.element).hasClass('animated') ) {
|
||||
|
||||
i++;
|
||||
|
||||
$(this.element).addClass('item-animate');
|
||||
setTimeout(function(){
|
||||
|
||||
$('body .animate-box.item-animate').each(function(k){
|
||||
var el = $(this);
|
||||
setTimeout( function () {
|
||||
var effect = el.data('animate-effect');
|
||||
if ( effect === 'fadeIn') {
|
||||
el.addClass('fadeIn animated');
|
||||
} else if ( effect === 'fadeInLeft') {
|
||||
el.addClass('fadeInLeft animated');
|
||||
} else if ( effect === 'fadeInRight') {
|
||||
el.addClass('fadeInRight animated');
|
||||
} else {
|
||||
el.addClass('fadeInUp animated');
|
||||
}
|
||||
|
||||
el.removeClass('item-animate');
|
||||
}, k * 200, 'easeInOutExpo' );
|
||||
});
|
||||
|
||||
}, 100);
|
||||
|
||||
}
|
||||
|
||||
} , { offset: '85%' } );
|
||||
};
|
||||
|
||||
|
||||
var burgerMenu = function() {
|
||||
|
||||
$('.js-colorlib-nav-toggle').on('click', function(event){
|
||||
event.preventDefault();
|
||||
var $this = $(this);
|
||||
|
||||
if ($('body').hasClass('offcanvas')) {
|
||||
$this.removeClass('active');
|
||||
$('body').removeClass('offcanvas');
|
||||
} else {
|
||||
$this.addClass('active');
|
||||
$('body').addClass('offcanvas');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
// Click outside of offcanvass
|
||||
var mobileMenuOutsideClick = function() {
|
||||
|
||||
$(document).click(function (e) {
|
||||
var container = $("#colorlib-aside, .js-colorlib-nav-toggle");
|
||||
if (!container.is(e.target) && container.has(e.target).length === 0) {
|
||||
|
||||
if ( $('body').hasClass('offcanvas') ) {
|
||||
|
||||
$('body').removeClass('offcanvas');
|
||||
$('.js-colorlib-nav-toggle').removeClass('active');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$(window).scroll(function(){
|
||||
if ( $('body').hasClass('offcanvas') ) {
|
||||
|
||||
$('body').removeClass('offcanvas');
|
||||
$('.js-colorlib-nav-toggle').removeClass('active');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var clickMenu = function() {
|
||||
|
||||
$('#navbar a:not([class="external"])').click(function(event){
|
||||
var section = $(this).data('nav-section'),
|
||||
navbar = $('#navbar');
|
||||
|
||||
if ( $('[data-section="' + section + '"]').length ) {
|
||||
$('html, body').animate({
|
||||
scrollTop: $('[data-section="' + section + '"]').offset().top - 55
|
||||
}, 500);
|
||||
}
|
||||
|
||||
if ( navbar.is(':visible')) {
|
||||
navbar.removeClass('in');
|
||||
navbar.attr('aria-expanded', 'false');
|
||||
$('.js-colorlib-nav-toggle').removeClass('active');
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
// Reflect scrolling in navigation
|
||||
var navActive = function(section) {
|
||||
|
||||
var $el = $('#navbar > ul');
|
||||
$el.find('li').removeClass('active');
|
||||
$el.each(function(){
|
||||
$(this).find('a[data-nav-section="'+section+'"]').closest('li').addClass('active');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var navigationSection = function() {
|
||||
|
||||
var $section = $('section[data-section]');
|
||||
|
||||
$section.waypoint(function(direction) {
|
||||
|
||||
if (direction === 'down') {
|
||||
navActive($(this.element).data('section'));
|
||||
}
|
||||
}, {
|
||||
offset: '150px'
|
||||
});
|
||||
|
||||
$section.waypoint(function(direction) {
|
||||
if (direction === 'up') {
|
||||
navActive($(this.element).data('section'));
|
||||
}
|
||||
}, {
|
||||
offset: function() { return -$(this.element).height() + 155; }
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var sliderMain = function() {
|
||||
|
||||
$('#colorlib-hero .flexslider').flexslider({
|
||||
animation: "fade",
|
||||
slideshowSpeed: 5000,
|
||||
directionNav: true,
|
||||
start: function(){
|
||||
setTimeout(function(){
|
||||
$('.slider-text').removeClass('animated fadeInUp');
|
||||
$('.flex-active-slide').find('.slider-text').addClass('animated fadeInUp');
|
||||
}, 500);
|
||||
},
|
||||
before: function(){
|
||||
setTimeout(function(){
|
||||
$('.slider-text').removeClass('animated fadeInUp');
|
||||
$('.flex-active-slide').find('.slider-text').addClass('animated fadeInUp');
|
||||
}, 500);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
var stickyFunction = function() {
|
||||
|
||||
var h = $('.image-content').outerHeight();
|
||||
|
||||
if ($(window).width() <= 992 ) {
|
||||
$("#sticky_item").trigger("sticky_kit:detach");
|
||||
} else {
|
||||
$('.sticky-parent').removeClass('stick-detach');
|
||||
$("#sticky_item").trigger("sticky_kit:detach");
|
||||
$("#sticky_item").trigger("sticky_kit:unstick");
|
||||
}
|
||||
|
||||
$(window).resize(function(){
|
||||
var h = $('.image-content').outerHeight();
|
||||
$('.sticky-parent').css('height', h);
|
||||
|
||||
|
||||
if ($(window).width() <= 992 ) {
|
||||
$("#sticky_item").trigger("sticky_kit:detach");
|
||||
} else {
|
||||
$('.sticky-parent').removeClass('stick-detach');
|
||||
$("#sticky_item").trigger("sticky_kit:detach");
|
||||
$("#sticky_item").trigger("sticky_kit:unstick");
|
||||
|
||||
$("#sticky_item").stick_in_parent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
$('.sticky-parent').css('height', h);
|
||||
|
||||
$("#sticky_item").stick_in_parent();
|
||||
|
||||
};
|
||||
|
||||
var owlCrouselFeatureSlide = function() {
|
||||
$('.owl-carousel').owlCarousel({
|
||||
animateOut: 'fadeOut',
|
||||
animateIn: 'fadeIn',
|
||||
autoplay: true,
|
||||
loop:true,
|
||||
margin:0,
|
||||
nav:true,
|
||||
dots: false,
|
||||
autoHeight: true,
|
||||
items: 1,
|
||||
navText: [
|
||||
"<i class='icon-arrow-left3 owl-direction'></i>",
|
||||
"<i class='icon-arrow-right3 owl-direction'></i>"
|
||||
]
|
||||
})
|
||||
};
|
||||
|
||||
// Document on load.
|
||||
$(function(){
|
||||
fullHeight();
|
||||
counter();
|
||||
counterWayPoint();
|
||||
contentWayPoint();
|
||||
burgerMenu();
|
||||
|
||||
clickMenu();
|
||||
// navActive();
|
||||
navigationSection();
|
||||
// windowScroll();
|
||||
|
||||
|
||||
mobileMenuOutsideClick();
|
||||
sliderMain();
|
||||
stickyFunction();
|
||||
owlCrouselFeatureSlide();
|
||||
});
|
||||
|
||||
|
||||
}());
|
||||
4
Public/js/modernizr-2.6.2.min.js
vendored
4
Public/js/modernizr-2.6.2.min.js
vendored
File diff suppressed because one or more lines are too long
2
Public/js/owl.carousel.min.js
vendored
2
Public/js/owl.carousel.min.js
vendored
File diff suppressed because one or more lines are too long
6
Public/js/respond.min.js
vendored
6
Public/js/respond.min.js
vendored
@@ -1,6 +0,0 @@
|
||||
|
||||
/*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl
|
||||
* Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT
|
||||
* */
|
||||
|
||||
!function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­<style media="'+a+'"> #mq-test-1 { width: 42px; }</style>',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b<s.length;b++){var c=s[b],e=c.href,f=c.media,g=c.rel&&"stylesheet"===c.rel.toLowerCase();e&&g&&!o[e]&&(c.styleSheet&&c.styleSheet.rawCssText?(v(c.styleSheet.rawCssText,e,f),o[e]=!0):(!/^([a-zA-Z:]*\/\/)/.test(e)&&!r||e.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&("//"===e.substring(0,2)&&(e=a.location.protocol+e),d.push({href:e,media:f})))}w()};x(),c.update=x,c.getEmValue=t,a.addEventListener?a.addEventListener("resize",b,!1):a.attachEvent&&a.attachEvent("onresize",b)}}(this);
|
||||
Reference in New Issue
Block a user