1st test version taco demo
This commit is contained in:
7
static/js/bootstrap.min.js
vendored
Normal file
7
static/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
static/js/jquery-2.1.3.min.js
vendored
Normal file
4
static/js/jquery-2.1.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
8
static/js/jquery.actual.min.js
vendored
Normal file
8
static/js/jquery.actual.min.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/*! Copyright 2012, Ben Lin (http://dreamerslab.com/)
|
||||
* Licensed under the MIT License (LICENSE.txt).
|
||||
*
|
||||
* Version: 1.0.13
|
||||
*
|
||||
* Requires: jQuery 1.2.3 ~ 1.8.2
|
||||
*/
|
||||
;(function(a){a.fn.extend({actual:function(b,l){if(!this[b]){throw'$.actual => The jQuery method "'+b+'" you called does not exist';}var f={absolute:false,clone:false,includeMargin:false};var i=a.extend(f,l);var e=this.eq(0);var h,j;if(i.clone===true){h=function(){var m="position: absolute !important; top: -1000 !important; ";e=e.clone().attr("style",m).appendTo("body");};j=function(){e.remove();};}else{var g=[];var d="";var c;h=function(){c=e.parents().andSelf().filter(":hidden");d+="visibility: hidden !important; display: block !important; ";if(i.absolute===true){d+="position: absolute !important; ";}c.each(function(){var m=a(this);g.push(m.attr("style"));m.attr("style",d);});};j=function(){c.each(function(m){var o=a(this);var n=g[m];if(n===undefined){o.removeAttr("style");}else{o.attr("style",n);}});};}h();var k=/(outer)/g.test(b)?e[b](i.includeMargin):e[b]();j();return k;}});})(jQuery);
|
||||
7
static/js/jquery.scrollTo.min.js
vendored
Normal file
7
static/js/jquery.scrollTo.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Copyright (c) 2007-2013 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
|
||||
* Dual licensed under MIT and GPL.
|
||||
* @author Ariel Flesler
|
||||
* @version 1.4.6
|
||||
*/
|
||||
;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,targ,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
|
||||
98
static/js/main.js
Normal file
98
static/js/main.js
Normal file
@@ -0,0 +1,98 @@
|
||||
(function($,sr) {
|
||||
// debouncing function from John Hann
|
||||
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
|
||||
var debounce = function (func, threshold, execAsap) {
|
||||
var timeout;
|
||||
return function debounced () {
|
||||
var obj = this, args = arguments;
|
||||
function delayed () {
|
||||
if (!execAsap)
|
||||
func.apply(obj, args);
|
||||
timeout = null;
|
||||
}
|
||||
;
|
||||
if (timeout)
|
||||
clearTimeout(timeout); else if (execAsap)
|
||||
func.apply(obj, args);
|
||||
timeout = setTimeout(delayed, threshold || 100);
|
||||
}
|
||||
;
|
||||
}
|
||||
// smartresize
|
||||
jQuery.fn[sr] = function(fn) {
|
||||
return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr);
|
||||
}
|
||||
;
|
||||
}
|
||||
)(jQuery,'smartresize');
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
///////////////////////////////
|
||||
// Set Home Slideshow Height
|
||||
///////////////////////////////
|
||||
function setHomeBannerHeight() {
|
||||
var windowHeight = jQuery(window).height();
|
||||
jQuery('#header').height(windowHeight);
|
||||
}
|
||||
///////////////////////////////
|
||||
// Center Home Slideshow Text
|
||||
///////////////////////////////
|
||||
function centerHomeBannerText() {
|
||||
var bannerText = jQuery('#header > .center');
|
||||
var bannerTextTop = (jQuery('#header').actual('height')/2) - (jQuery('#header > .center').actual('height')/2) - 20;
|
||||
bannerText.css('padding-top', bannerTextTop+'px');
|
||||
bannerText.show();
|
||||
}
|
||||
setHomeBannerHeight();
|
||||
centerHomeBannerText();
|
||||
//Resize events
|
||||
jQuery(window).smartresize(function() {
|
||||
setHomeBannerHeight();
|
||||
centerHomeBannerText();
|
||||
});
|
||||
|
||||
function scroll() {
|
||||
if ($(window).scrollTop() == 0 ) {
|
||||
//$('.nav > li').removeClass('active');
|
||||
console.log($(window).scrollTop());
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
document.onscroll = scroll;
|
||||
var $scrollDownArrow = $('#scrollDownArrow');
|
||||
var animateScrollDownArrow = function() {
|
||||
$scrollDownArrow.animate( {
|
||||
top: 5,
|
||||
}
|
||||
, 400, "linear", function() {
|
||||
$scrollDownArrow.animate( {
|
||||
top: -5,
|
||||
}
|
||||
, 400, "linear", function() {
|
||||
animateScrollDownArrow();
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
animateScrollDownArrow();
|
||||
//Set Down Arrow Button
|
||||
jQuery('#scrollDownArrow').click(function(e) {
|
||||
e.preventDefault();
|
||||
jQuery.scrollTo("#story", 1000, {
|
||||
offset:-(jQuery('#header #menu').height()), axis:'y'
|
||||
}
|
||||
);
|
||||
});
|
||||
jQuery('.nav > li > a, #logo a').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
jQuery.scrollTo(jQuery(this).attr('href'), 400, {
|
||||
offset:-(jQuery('#header #menu').height()), axis:'y'
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
1951
static/js/vendor/bootstrap.js
vendored
Normal file
1951
static/js/vendor/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
static/js/vendor/bootstrap.min.js
vendored
Normal file
6
static/js/vendor/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
static/js/vendor/jquery-1.11.0.min.js
vendored
Normal file
4
static/js/vendor/jquery-1.11.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js
vendored
Normal file
11
static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user