first commit
This commit is contained in:
6
cn/js/01-bootstrap.min.js
vendored
Normal file
6
cn/js/01-bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9
cn/js/02-bootstrap-select.min.js
vendored
Normal file
9
cn/js/02-bootstrap-select.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
68
cn/js/03-color-settings.js
Normal file
68
cn/js/03-color-settings.js
Normal file
@@ -0,0 +1,68 @@
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$('.color-trigger').on('click', function () {
|
||||
$(this).parent().toggleClass('visible-palate');
|
||||
});
|
||||
|
||||
$('.color-palate .colors-list .palate').on('click', function() {
|
||||
var newThemeColor = $(this).attr('data-theme-file');
|
||||
var targetCSSFile = $('link[id="theme-color-file"]');
|
||||
$(targetCSSFile).attr('href',newThemeColor);
|
||||
$('.color-palate .colors-list .palate').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
|
||||
var layoutChangerBtn = $(".color-palate .header-version li");
|
||||
var body = $("body");
|
||||
layoutChangerBtn.on("click", function(e) {
|
||||
var $this = $(this);
|
||||
if ( $this.hasClass("box") ) {
|
||||
body.addClass("want-sticky-header");
|
||||
} else {
|
||||
body.removeClass("want-sticky-header");
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var layoutChangerBtn = $(".color-palate .dark-version li");
|
||||
var body = $("body");
|
||||
layoutChangerBtn.on("click", function(e) {
|
||||
var $this = $(this);
|
||||
if ( $this.hasClass("box") ) {
|
||||
body.addClass("dark-body");
|
||||
} else {
|
||||
body.removeClass("dark-body");
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
var layoutChangerBtn = $(".color-palate .box-version li");
|
||||
var body = $("body");
|
||||
layoutChangerBtn.on("click", function(e) {
|
||||
var $this = $(this);
|
||||
if ( $this.hasClass("box") ) {
|
||||
body.addClass("box-layout");
|
||||
} else {
|
||||
body.removeClass("box-layout");
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
var directionChanger = $(".color-palate .rtl-version li");
|
||||
var wrapper = $(".page-wrapper");
|
||||
directionChanger.on("click", function(e) {
|
||||
var $this = $(this);
|
||||
if ( $this.hasClass("rtl") ) {
|
||||
wrapper.addClass("rtl");
|
||||
} else {
|
||||
wrapper.removeClass("rtl");
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
}(jQuery));
|
||||
3273
cn/js/04-owl.js
Normal file
3273
cn/js/04-owl.js
Normal file
File diff suppressed because it is too large
Load Diff
7
cn/js/05-jarallax.min.js
vendored
Normal file
7
cn/js/05-jarallax.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
cn/js/06-isotope.js
Normal file
8
cn/js/06-isotope.js
Normal file
File diff suppressed because one or more lines are too long
2
cn/js/07-wow.js
Normal file
2
cn/js/07-wow.js
Normal file
File diff suppressed because one or more lines are too long
4
cn/js/08-validate.js
Normal file
4
cn/js/08-validate.js
Normal file
File diff suppressed because one or more lines are too long
301
cn/js/09-appear.js
Normal file
301
cn/js/09-appear.js
Normal file
@@ -0,0 +1,301 @@
|
||||
/*
|
||||
|
||||
* jQuery.appear
|
||||
|
||||
* https://github.com/bas2k/jquery.appear/
|
||||
|
||||
* http://code.google.com/p/jquery-appear/
|
||||
|
||||
* http://bas2k.ru/
|
||||
|
||||
*
|
||||
|
||||
* Copyright (c) 2009 Michael Hixson
|
||||
|
||||
* Copyright (c) 2012-2014 Alexander Brovikov
|
||||
|
||||
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
||||
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
$.fn.appear = function(fn, options) {
|
||||
|
||||
|
||||
|
||||
var settings = $.extend({
|
||||
|
||||
|
||||
|
||||
//arbitrary data to pass to fn
|
||||
|
||||
data: undefined,
|
||||
|
||||
|
||||
|
||||
//call fn only on the first appear?
|
||||
|
||||
one: true,
|
||||
|
||||
|
||||
|
||||
// X & Y accuracy
|
||||
|
||||
accX: 0,
|
||||
|
||||
accY: 0
|
||||
|
||||
|
||||
|
||||
}, options);
|
||||
|
||||
|
||||
|
||||
return this.each(function() {
|
||||
|
||||
|
||||
|
||||
var t = $(this);
|
||||
|
||||
|
||||
|
||||
//whether the element is currently visible
|
||||
|
||||
t.appeared = false;
|
||||
|
||||
|
||||
|
||||
if (!fn) {
|
||||
|
||||
|
||||
|
||||
//trigger the custom event
|
||||
|
||||
t.trigger('appear', settings.data);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var w = $(window);
|
||||
|
||||
|
||||
|
||||
//fires the appear event when appropriate
|
||||
|
||||
var check = function() {
|
||||
|
||||
|
||||
|
||||
//is the element hidden?
|
||||
|
||||
if (!t.is(':visible')) {
|
||||
|
||||
|
||||
|
||||
//it became hidden
|
||||
|
||||
t.appeared = false;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//is the element inside the visible window?
|
||||
|
||||
var a = w.scrollLeft();
|
||||
|
||||
var b = w.scrollTop();
|
||||
|
||||
var o = t.offset();
|
||||
|
||||
var x = o.left;
|
||||
|
||||
var y = o.top;
|
||||
|
||||
|
||||
|
||||
var ax = settings.accX;
|
||||
|
||||
var ay = settings.accY;
|
||||
|
||||
var th = t.height();
|
||||
|
||||
var wh = w.height();
|
||||
|
||||
var tw = t.width();
|
||||
|
||||
var ww = w.width();
|
||||
|
||||
|
||||
|
||||
if (y + th + ay >= b &&
|
||||
|
||||
y <= b + wh + ay &&
|
||||
|
||||
x + tw + ax >= a &&
|
||||
|
||||
x <= a + ww + ax) {
|
||||
|
||||
|
||||
|
||||
//trigger the custom event
|
||||
|
||||
if (!t.appeared) t.trigger('appear', settings.data);
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
//it scrolled out of view
|
||||
|
||||
t.appeared = false;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
//create a modified fn with some additional logic
|
||||
|
||||
var modifiedFn = function() {
|
||||
|
||||
|
||||
|
||||
//mark the element as visible
|
||||
|
||||
t.appeared = true;
|
||||
|
||||
|
||||
|
||||
//is this supposed to happen only once?
|
||||
|
||||
if (settings.one) {
|
||||
|
||||
|
||||
|
||||
//remove the check
|
||||
|
||||
w.unbind('scroll', check);
|
||||
|
||||
var i = $.inArray(check, $.fn.appear.checks);
|
||||
|
||||
if (i >= 0) $.fn.appear.checks.splice(i, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//trigger the original fn
|
||||
|
||||
fn.apply(this, arguments);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
//bind the modified fn to the element
|
||||
|
||||
if (settings.one) t.one('appear', settings.data, modifiedFn);
|
||||
|
||||
else t.bind('appear', settings.data, modifiedFn);
|
||||
|
||||
|
||||
|
||||
//check whenever the window scrolls
|
||||
|
||||
w.scroll(check);
|
||||
|
||||
|
||||
|
||||
//check whenever the dom changes
|
||||
|
||||
$.fn.appear.checks.push(check);
|
||||
|
||||
|
||||
|
||||
//check now
|
||||
|
||||
(check)();
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
//keep a queue of appearance checks
|
||||
|
||||
$.extend($.fn.appear, {
|
||||
|
||||
|
||||
|
||||
checks: [],
|
||||
|
||||
timeout: null,
|
||||
|
||||
|
||||
|
||||
//process the queue
|
||||
|
||||
checkAll: function() {
|
||||
|
||||
var length = $.fn.appear.checks.length;
|
||||
|
||||
if (length > 0) while (length--) ($.fn.appear.checks[length])();
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
//check the queue asynchronously
|
||||
|
||||
run: function() {
|
||||
|
||||
if ($.fn.appear.timeout) clearTimeout($.fn.appear.timeout);
|
||||
|
||||
$.fn.appear.timeout = setTimeout($.fn.appear.checkAll, 20);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
//run checks when these methods are called
|
||||
|
||||
$.each(['append', 'prepend', 'after', 'before', 'attr',
|
||||
|
||||
'removeAttr', 'addClass', 'removeClass', 'toggleClass',
|
||||
|
||||
'remove', 'css', 'show', 'hide'], function(i, n) {
|
||||
|
||||
var old = $.fn[n];
|
||||
|
||||
if (old) {
|
||||
|
||||
$.fn[n] = function() {
|
||||
|
||||
var r = old.apply(this, arguments);
|
||||
|
||||
$.fn.appear.run();
|
||||
|
||||
return r;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
})(jQuery);
|
||||
14
cn/js/10-swiper.min.js
vendored
Normal file
14
cn/js/10-swiper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
69
cn/js/11-jquery.easing.min.js
vendored
Normal file
69
cn/js/11-jquery.easing.min.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;if(!g)g=e*.3*1.5;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);if(b<1)return-.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c;return h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;return d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;return d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){if(f==undefined)f=1.70158;if((b/=e/2)<1)return d/2*b*b*(((f*=1.525)+1)*b-f)+c;return d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){if((b/=e)<1/2.75){return d*7.5625*b*b+c}else if(b<2/2.75){return d*(7.5625*(b-=1.5/2.75)*b+.75)+c}else if(b<2.5/2.75){return d*(7.5625*(b-=2.25/2.75)*b+.9375)+c}else{return d*(7.5625*(b-=2.625/2.75)*b+.984375)+c}},easeInOutBounce:function(a,b,c,d,e){if(b<e/2)return jQuery.easing.easeInBounce(a,b*2,0,d,e)*.5+c;return jQuery.easing.easeOutBounce(a,b*2-e,0,d,e)*.5+d*.5+c}})
|
||||
/*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
10
cn/js/12-gsap.min.js
vendored
Normal file
10
cn/js/12-gsap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
cn/js/13-odometer.js
Normal file
4
cn/js/13-odometer.js
Normal file
File diff suppressed because one or more lines are too long
6
cn/js/14-tilt.jquery.min.js
vendored
Normal file
6
cn/js/14-tilt.jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
cn/js/15-magnific-popup.min.js
vendored
Normal file
4
cn/js/15-magnific-popup.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
18709
cn/js/16-jquery-ui.js
Normal file
18709
cn/js/16-jquery-ui.js
Normal file
File diff suppressed because it is too large
Load Diff
1
cn/js/17-marquee.min.js
vendored
Normal file
1
cn/js/17-marquee.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
150
cn/js/18-jquery.circleType.js
Normal file
150
cn/js/18-jquery.circleType.js
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* CircleType 0.34
|
||||
* Peter Hrynkow
|
||||
* Copyright 2013, Licensed GPL & MIT
|
||||
*
|
||||
*/
|
||||
|
||||
$.fn.circleType = function (options) {
|
||||
|
||||
var settings = {
|
||||
dir: 1,
|
||||
position: 'relative'
|
||||
};
|
||||
if (typeof ($.fn.lettering) !== 'function') {
|
||||
console.log('Lettering.js is required');
|
||||
return;
|
||||
}
|
||||
return this.each(function () {
|
||||
|
||||
if (options) {
|
||||
$.extend(settings, options);
|
||||
}
|
||||
var elem = this,
|
||||
delta = (180 / Math.PI),
|
||||
ch = parseInt($(elem).css('line-height'), 10),
|
||||
fs = parseInt($(elem).css('font-size'), 10),
|
||||
txt = elem.innerHTML.replace(/^\s+|\s+$/g, '').replace(/\s/g, ' '),
|
||||
letters,
|
||||
center;
|
||||
|
||||
elem.innerHTML = txt
|
||||
$(elem).lettering();
|
||||
|
||||
elem.style.position = settings.position;
|
||||
|
||||
letters = elem.getElementsByTagName('span');
|
||||
center = Math.floor(letters.length / 2)
|
||||
|
||||
var layout = function () {
|
||||
var tw = 0,
|
||||
i,
|
||||
offset = 0,
|
||||
minRadius,
|
||||
origin,
|
||||
innerRadius,
|
||||
l, style, r, transform;
|
||||
|
||||
for (i = 0; i < letters.length; i++) {
|
||||
tw += letters[i].offsetWidth;
|
||||
}
|
||||
minRadius = (tw / Math.PI) / 2 + ch;
|
||||
|
||||
if (settings.fluid && !settings.fitText) {
|
||||
settings.radius = Math.max(elem.offsetWidth / 2, minRadius);
|
||||
} else if (!settings.radius) {
|
||||
settings.radius = minRadius;
|
||||
}
|
||||
|
||||
if (settings.dir === -1) {
|
||||
origin = 'center ' + (-settings.radius + ch) / fs + 'em';
|
||||
} else {
|
||||
origin = 'center ' + settings.radius / fs + 'em';
|
||||
}
|
||||
|
||||
innerRadius = settings.radius - ch;
|
||||
|
||||
for (i = 0; i < letters.length; i++) {
|
||||
l = letters[i];
|
||||
offset += l.offsetWidth / 2 / innerRadius * delta;
|
||||
l.rot = offset;
|
||||
offset += l.offsetWidth / 2 / innerRadius * delta;
|
||||
}
|
||||
for (i = 0; i < letters.length; i++) {
|
||||
l = letters[i]
|
||||
style = l.style
|
||||
r = (-offset * settings.dir / 2) + l.rot * settings.dir
|
||||
transform = 'rotate(' + r + 'deg)';
|
||||
|
||||
style.position = 'absolute';
|
||||
style.left = '50%';
|
||||
style.marginLeft = -(l.offsetWidth / 2) / fs + 'em';
|
||||
|
||||
style.webkitTransform = transform;
|
||||
style.MozTransform = transform;
|
||||
style.OTransform = transform;
|
||||
style.msTransform = transform;
|
||||
style.transform = transform;
|
||||
|
||||
style.webkitTransformOrigin = origin;
|
||||
style.MozTransformOrigin = origin;
|
||||
style.OTransformOrigin = origin;
|
||||
style.msTransformOrigin = origin;
|
||||
style.transformOrigin = origin;
|
||||
if (settings.dir === -1) {
|
||||
style.bottom = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.fitText) {
|
||||
if (typeof ($.fn.fitText) !== 'function') {
|
||||
console.log('FitText.js is required when using the fitText option');
|
||||
} else {
|
||||
$(elem).fitText();
|
||||
$(window).resize(function () {
|
||||
updateHeight();
|
||||
});
|
||||
}
|
||||
}
|
||||
updateHeight();
|
||||
};
|
||||
|
||||
var getBounds = function (elem) {
|
||||
var docElem = document.documentElement,
|
||||
box = elem.getBoundingClientRect();
|
||||
return {
|
||||
top: box.top + window.pageYOffset - docElem.clientTop,
|
||||
left: box.left + window.pageXOffset - docElem.clientLeft,
|
||||
height: box.height
|
||||
};
|
||||
};
|
||||
|
||||
var updateHeight = function () {
|
||||
var mid = getBounds(letters[center]),
|
||||
first = getBounds(letters[0]),
|
||||
h;
|
||||
if (mid.top < first.top) {
|
||||
h = first.top - mid.top + first.height;
|
||||
} else {
|
||||
h = mid.top - first.top + first.height;
|
||||
}
|
||||
elem.style.height = h + 'px';
|
||||
}
|
||||
|
||||
if (settings.fluid && !settings.fitText) {
|
||||
$(window).resize(function () {
|
||||
layout();
|
||||
});
|
||||
}
|
||||
|
||||
if (document.readyState !== "complete") {
|
||||
elem.style.visibility = 'hidden';
|
||||
$(window).load(function () {
|
||||
elem.style.visibility = 'visible';
|
||||
layout();
|
||||
});
|
||||
} else {
|
||||
layout();
|
||||
}
|
||||
});
|
||||
};
|
||||
2
cn/js/19-jquery.lettering.min.js
vendored
Normal file
2
cn/js/19-jquery.lettering.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Lettering.JS 0.6.1 by Dave Rupert - http://daverupert.com */
|
||||
(function($){function injector(t,splitter,klass,after){var a=t.text().split(splitter),inject='';if(a.length){$(a).each(function(i,item){inject+='<span class="'+klass+(i+1)+'">'+item+'</span>'+after});t.empty().append(inject)}}var methods={init:function(){return this.each(function(){injector($(this),'','char','')})},words:function(){return this.each(function(){injector($(this),' ','word',' ')})},lines:function(){return this.each(function(){var r="eefec303079ad17405c889e092e105b0";injector($(this).children("br").replaceWith(r).end(),r,'line','')})}};$.fn.lettering=function(method){if(method&&methods[method]){return methods[method].apply(this,[].slice.call(arguments,1))}else if(method==='letters'||!method){return methods.init.apply(this,[].slice.call(arguments,0))}$.error('Method '+method+' does not exist on jQuery.lettering');return this}})(jQuery);
|
||||
48
cn/js/ajax-form.js
Normal file
48
cn/js/ajax-form.js
Normal file
@@ -0,0 +1,48 @@
|
||||
$(function() {
|
||||
|
||||
// Get the form.
|
||||
var form = $('#contact-form');
|
||||
|
||||
// Get the messages div.
|
||||
var formMessages = $('.ajax-response');
|
||||
|
||||
// Set up an event listener for the contact form.
|
||||
$(form).submit(function(e) {
|
||||
// Stop the browser from submitting the form.
|
||||
e.preventDefault();
|
||||
|
||||
// Serialize the form data.
|
||||
var formData = $(form).serialize();
|
||||
|
||||
// Submit the form using AJAX.
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: $(form).attr('action'),
|
||||
data: formData
|
||||
})
|
||||
.done(function(response) {
|
||||
// Make sure that the formMessages div has the 'success' class.
|
||||
$(formMessages).removeClass('error');
|
||||
$(formMessages).addClass('success');
|
||||
|
||||
// Set the message text.
|
||||
$(formMessages).text(response);
|
||||
|
||||
// Clear the form.
|
||||
$('#contact-form input,#contact-form textarea').val('');
|
||||
})
|
||||
.fail(function(data) {
|
||||
// Make sure that the formMessages div has the 'error' class.
|
||||
$(formMessages).removeClass('success');
|
||||
$(formMessages).addClass('error');
|
||||
|
||||
// Set the message text.
|
||||
if (data.responseText !== '') {
|
||||
$(formMessages).text(data.responseText);
|
||||
} else {
|
||||
$(formMessages).text('Oops! An error occured and your message could not be sent.');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
2
cn/js/jquery.js
vendored
Normal file
2
cn/js/jquery.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1321
cn/js/script.js
Normal file
1321
cn/js/script.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user