Team:Minnesota/Templates
From 2014.igem.org
Line 2: | Line 2: | ||
{{:Team:Minnesota/Templates/jqueryslimscrollminjs}} | {{:Team:Minnesota/Templates/jqueryslimscrollminjs}} | ||
{{:Team:Minnesota/Templates/cssStyle}} | {{:Team:Minnesota/Templates/cssStyle}} | ||
+ | {{:Team:Minnesota/Templates/jqueryfullpagecss}} | ||
<html> | <html> | ||
Line 8: | Line 9: | ||
<title>UMN iGEM 2014</title> | <title>UMN iGEM 2014</title> | ||
<style> | <style> | ||
- | |||
/* Style for our header texts | /* Style for our header texts | ||
* --------------------------------------- */ | * --------------------------------------- */ |
Revision as of 01:26, 5 September 2014
/**
* fullPage 2.1.8 * https://github.com/alvarotrigo/fullPage.js * MIT licensed * * Copyright (C) 2013 alvarotrigo.com - A project by Alvaro Trigo */
(function(a){a.fn.fullpage=function(b){function M(){a(".fp-section").each(function(){var c=a(this).find(".fp-slide");c.length?c.each(function(){z(a(this))}):z(a(this))});a.isFunction(b.afterRender)&&b.afterRender.call(this)}function N(){if(!b.autoScrolling){var c=a(window).scrollTop(),d=a(".fp-section").map(function(){if(a(this).offset().top<c+100)return a(this)}),d=d[d.length-1];if(!d.hasClass("active")){var e=a(".fp-section.active").index(".fp-section")+1;F=!0;var f=G(d);d.addClass("active").siblings().removeClass("active"); var g=d.data("anchor");a.isFunction(b.onLeave)&&b.onLeave.call(this,e,d.index(".fp-section")+1,f);a.isFunction(b.afterLoad)&&b.afterLoad.call(this,g,d.index(".fp-section")+1);H(g);I(g,0);b.anchors.length&&!t&&(v=g,location.hash=g);clearTimeout(O);O=setTimeout(function(){F=!1},100)}}}function da(c){var d=c.originalEvent;b.autoScrolling&&c.preventDefault();if(!P(c.target)&&(c=a(".fp-section.active"),!t&&!p))if(d=Q(d),w=d.y,A=d.x,c.find(".fp-slides").length&&Math.abs(B-A)>Math.abs(x-w))Math.abs(B-A)> a(window).width()/100*b.touchSensitivity&&(B>A?a.fn.fullpage.moveSlideRight():a.fn.fullpage.moveSlideLeft());else if(b.autoScrolling&&(d=c.find(".fp-slides").length?c.find(".fp-slide.active").find(".fp-scrollable"):c.find(".fp-scrollable"),Math.abs(x-w)>a(window).height()/100*b.touchSensitivity))if(x>w)if(0<d.length)if(C("bottom",d))a.fn.fullpage.moveSectionDown();else return!0;else a.fn.fullpage.moveSectionDown();else if(w>x)if(0<d.length)if(C("top",d))a.fn.fullpage.moveSectionUp();else return!0; else a.fn.fullpage.moveSectionUp()}function P(c,d){d=d||0;var e=a(c).parent();return dc)if(0<d.length)if(C("bottom",d))a.fn.fullpage.moveSectionDown();else return!0;else a.fn.fullpage.moveSectionDown();else if(0<d.length)if(C("top",d))a.fn.fullpage.moveSectionUp();else return!0;else a.fn.fullpage.moveSectionUp();return!1}}function R(c){var d=a(".fp-section.active").find(".fp-slides");if(d.length&&!p){var e=d.find(".fp-slide.active"),f=null,f="prev"===c?e.prev(".fp-slide"):e.next(".fp-slide");if(!f.length){if(!b.loopHorizontal)return;f="prev"===c?e.siblings(":last"):e.siblings(":first")}p= !0;q(d,f)}}function k(c,d,e){var f={},g=c.position();if("undefined"!==typeof g){var g=g.top,y=G(c),r=c.data("anchor"),h=c.index(".fp-section"),p=c.find(".fp-slide.active"),s=a(".fp-section.active"),l=s.index(".fp-section")+1,E=D;if(p.length)var n=p.data("anchor"),q=p.index();if(b.autoScrolling&&b.continuousVertical&&"undefined"!==typeof e&&(!e&&"up"==y||e&&"down"==y)){e?a(".fp-section.active").before(s.nextAll(".fp-section")):a(".fp-section.active").after(s.prevAll(".fp-section").get().reverse()); u(a(".fp-section.active").position().top);var k=s,g=c.position(),g=g.top,y=G(c)}c.addClass("active").siblings().removeClass("active");t=!0;"undefined"!==typeof r&&S(q,n,r);b.autoScrolling?(f.top=-g,c="."+T):(f.scrollTop=g,c="html, body");var m=function(){k&&k.length&&(e?a(".fp-section:first").before(k):a(".fp-section:last").after(k),u(a(".fp-section.active").position().top))};b.css3&&b.autoScrolling?(a.isFunction(b.onLeave)&&!E&&b.onLeave.call(this,l,h+1,y),U("translate3d(0px, -"+g+"px, 0px)",!0), setTimeout(function(){m();a.isFunction(b.afterLoad)&&!E&&b.afterLoad.call(this,r,h+1);setTimeout(function(){t=!1;a.isFunction(d)&&d.call(this)},V)},b.scrollingSpeed)):(a.isFunction(b.onLeave)&&!E&&b.onLeave.call(this,l,h+1,y),a(c).animate(f,b.scrollingSpeed,b.easing,function(){m();a.isFunction(b.afterLoad)&&!E&&b.afterLoad.call(this,r,h+1);setTimeout(function(){t=!1;a.isFunction(d)&&d.call(this)},V)}));v=r;b.autoScrolling&&(H(r),I(r,h))}}function W(){if(!F){var c=window.location.hash.replace("#", "").split("/"),a=c[0],c=c[1];if(a.length){var b="undefined"===typeof v,f="undefined"===typeof v&&"undefined"===typeof c&&!p;(a&&a!==v&&!b||f||!p&&J!=c)&&K(a,c)}}}function q(c,d){var e=d.position(),f=c.find(".fp-slidesContainer").parent(),g=d.index(),h=c.closest(".fp-section"),r=h.index(".fp-section"),k=h.data("anchor"),l=h.find(".fp-slidesNav"),s=d.data("anchor"),m=D;if(b.onSlideLeave){var n=h.find(".fp-slide.active").index(),q;q=n==g?"none":n>g?"left":"right";m||a.isFunction(b.onSlideLeave)&&b.onSlideLeave.call(this, k,r+1,n,q)}d.addClass("active").siblings().removeClass("active");"undefined"===typeof s&&(s=g);h.hasClass("active")&&(b.loopHorizontal||(h.find(".fp-controlArrow.fp-prev").toggle(0!=g),h.find(".fp-controlArrow.fp-next").toggle(!d.is(":last-child"))),S(g,s,k));b.css3?(e="translate3d(-"+e.left+"px, 0px, 0px)",c.find(".fp-slidesContainer").toggleClass("fp-easing",0<b.scrollingSpeed).css(X(e)),setTimeout(function(){m||a.isFunction(b.afterSlideLoad)&&b.afterSlideLoad.call(this,k,r+1,s,g);p=!1},b.scrollingSpeed, b.easing)):f.animate({scrollLeft:e.left},b.scrollingSpeed,b.easing,function(){m||a.isFunction(b.afterSlideLoad)&&b.afterSlideLoad.call(this,k,r+1,s,g);p=!1});l.find(".active").removeClass("active");l.find("li").eq(g).find("a").addClass("active")}function fa(c,d){var b=825,f=c;825>c||900>d?(900>d&&(f=d,b=900),b=(100*f/b).toFixed(2),a("body").css("font-size",b+"%")):a("body").css("font-size","100%")}function I(c,d){b.navigation&&(a("#fp-nav").find(".active").removeClass("active"),c?a("#fp-nav").find('a[href="#'+ c+'"]').addClass("active"):a("#fp-nav").find("li").eq(d).find("a").addClass("active"))}function H(c){b.menu&&(a(b.menu).find(".active").removeClass("active"),a(b.menu).find('[data-menuanchor="'+c+'"]').addClass("active"))}function C(c,a){if("top"===c)return!a.scrollTop();if("bottom"===c)return a.scrollTop()+1+a.innerHeight()>=a[0].scrollHeight}function G(c){var b=a(".fp-section.active").index(".fp-section");c=c.index(".fp-section");return b>c?"up":"down"}function z(a){a.css("overflow","hidden");var d= a.closest(".fp-section"),e=a.find(".fp-scrollable");if(e.length)var f=e.get(0).scrollHeight;else f=a.get(0).scrollHeight,b.verticalCentered&&(f=a.find(".fp-tableCell").get(0).scrollHeight);d=l-parseInt(d.css("padding-bottom"))-parseInt(d.css("padding-top"));f>d?e.length?e.css("height",d+"px").parent().css("height",d+"px"):(b.verticalCentered?a.find(".fp-tableCell").wrapInner('<div class="fp-scrollable" />'):a.wrapInner('<div class="fp-scrollable" />'),a.find(".fp-scrollable").slimScroll({allowPageScroll:!0, height:d+"px",size:"10px",alwaysVisible:!0})):Y(a);a.css("overflow","")}function Y(a){a.find(".fp-scrollable").children().first().unwrap().unwrap();a.find(".slimScrollBar").remove();a.find(".slimScrollRail").remove()}function Z(a){a.addClass("fp-table").wrapInner('<div class="fp-tableCell" style="height:'+$(a)+'px;" />')}function $(a){var d=l;if(b.paddingTop||b.paddingBottom)d=a,d.hasClass("fp-section")||(d=a.closest(".fp-section")),a=parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom")),
d=l-a;return d}function U(a,b){h.toggleClass("fp-easing",b);h.css(X(a))}function K(c,b){"undefined"===typeof b&&(b=0);var e=isNaN(c)?a('[data-anchor="'+c+'"]'):a(".fp-section").eq(c-1);c===v||e.hasClass("active")?aa(e,b):k(e,function(){aa(e,b)})}function aa(a,b){if("undefined"!=typeof b){var e=a.find(".fp-slides"),f=e.find('[data-anchor="'+b+'"]');f.length||(f=e.find(".fp-slide").eq(b));f.length&&q(e,f)}}function ga(a,d){a.append(' ');var e=a.find(".fp-slidesNav"); e.addClass(b.slidesNavPosition);for(var f=0;f<d;f++)e.find("ul").append('var m=a("#fp-nav");m.css("color",b.navigationColor);m.addClass(b.navigationPosition)}a(".fp-section").each(function(c){var d=a(this),e=a(this).find(".fp-slide"),f=e.length;c||0!==a(".fp-section.active").length||a(this).addClass("active");a(this).css("height",l+"px");(b.paddingTop||b.paddingBottom)&&a(this).css("padding",b.paddingTop+" 0 "+b.paddingBottom+" 0");"undefined"!==typeof b.sectionsColor[c]&&a(this).css("background-color",b.sectionsColor[c]);"undefined"!==typeof b.anchors[c]&&a(this).attr("data-anchor",
b.anchors[c]);if(b.navigation){var g="";b.anchors.length&&(g=b.anchors[c]);c=b.navigationTooltips[c];"undefined"===typeof c&&(c="");m.find("ul").append('"#fff"!=b.controlArrowColor&&(a(this).find(".fp-controlArrow.fp-next").css("border-color","transparent transparent transparent "+b.controlArrowColor),a(this).find(".fp-controlArrow.fp-prev").css("border-color","transparent "+b.controlArrowColor+" transparent transparent"));b.loopHorizontal||a(this).find(".fp-controlArrow.fp-prev").hide();b.slidesNavigation&&ga(a(this),f);e.each(function(c){c||0!=d.find(".fp-slide.active").length||a(this).addClass("active");a(this).css("width",h+"%");b.verticalCentered&& Z(a(this))})}else b.verticalCentered&&Z(a(this))}).promise().done(function(){a.fn.fullpage.setAutoScrolling(b.autoScrolling);var c=a(".fp-section.active").find(".fp-slide.active");if(c.length&&(0!=a(".fp-section.active").index(".fp-section")||0==a(".fp-section.active").index(".fp-section")&&0!=c.index())){var d=b.scrollingSpeed;a.fn.fullpage.setScrollingSpeed(0);q(a(".fp-section.active").find(".fp-slides"),c);a.fn.fullpage.setScrollingSpeed(d)}b.fixedElements&&b.css3&&a(b.fixedElements).appendTo("body"); b.navigation&&(m.css("margin-top","-"+m.height()/2+"px"),m.find("li").eq(a(".fp-section.active").index(".fp-section")).find("a").addClass("active"));b.menu&&b.css3&&a(b.menu).closest(".fullpage-wrapper").length&&a(b.menu).appendTo("body");b.scrollOverflow?(h.hasClass("fullpage-used")&&M(),a(window).on("load",M)):a.isFunction(b.afterRender)&&b.afterRender.call(this);c=window.location.hash.replace("#","").split("/")[0];c.length&&(d=a('[data-anchor="'+c+'"]'),!b.animateAnchor&&d.length&&(b.autoScrolling? u(d.position().top):(u(0),a("html, body").scrollTop(d.position().top)),H(c),I(c,null),a.isFunction(b.afterLoad)&&b.afterLoad.call(this,c,d.index(".fp-section")+1),d.addClass("active").siblings().removeClass("active")));a(window).on("load",function(){var a=window.location.hash.replace("#","").split("/"),b=a[0],a=a[1];b&&K(b,a)})});var O,F=!1;a(window).on("scroll",N);var x=0,B=0,w=0,A=0;a.fn.fullpage.moveSectionUp=function(){var c=a(".fp-section.active").prev(".fp-section");c.length||!b.loopTop&&!b.continuousVertical|| (c=a(".fp-section").last());c.length&&k(c,null,!0)};a.fn.fullpage.moveSectionDown=function(){var c=a(".fp-section.active").next(".fp-section");c.length||!b.loopBottom&&!b.continuousVertical||(c=a(".fp-section").first());(0<c.length||!c.length&&(b.loopBottom||b.continuousVertical))&&k(c,null,!1)};a.fn.fullpage.moveTo=function(b,d){var e="",e=isNaN(b)?a('[data-anchor="'+b+'"]'):a(".fp-section").eq(b-1);"undefined"!==typeof d?K(b,d):0<e.length&&k(e)};a.fn.fullpage.moveSlideRight=function(){R("next")}; a.fn.fullpage.moveSlideLeft=function(){R("prev")};a(window).on("hashchange",W);a(document).keydown(function(c){if(b.keyboardScrolling&&!t)switch(c.which){case 38:case 33:a.fn.fullpage.moveSectionUp();break;case 40:case 34:a.fn.fullpage.moveSectionDown();break;case 36:a.fn.fullpage.moveTo(1);break;case 35:a.fn.fullpage.moveTo(a(".fp-section").length);break;case 37:a.fn.fullpage.moveSlideLeft();break;case 39:a.fn.fullpage.moveSlideRight()}});a(document).on("click","#fp-nav a",function(b){b.preventDefault();
b=a(this).parent().index();k(a(".fp-section").eq(b))});a(document).on({mouseenter:function(){var c=a(this).data("tooltip");a(' ").hide().appendTo(a(this)).fadeIn(200)},mouseleave:function(){a(this).find(".fp-tooltip").fadeOut().remove()}},"#fp-nav li");b.normalScrollElements&&(a(document).on("mouseover",b.normalScrollElements,function(){a.fn.fullpage.setMouseWheelScrolling(!1)}),a(document).on("mouseout",b.normalScrollElements,function(){a.fn.fullpage.setMouseWheelScrolling(!0)}));a(".fp-section").on("click",".fp-controlArrow",function(){a(this).hasClass("fp-prev")?a.fn.fullpage.moveSlideLeft():a.fn.fullpage.moveSlideRight()});a(".fp-section").on("click",".toSlide",function(b){b.preventDefault();b=a(this).closest(".fp-section").find(".fp-slides");b.find(".fp-slide.active");var d=null,d=b.find(".fp-slide").eq(a(this).data("index")-1);0<d.length&&q(b,d)});var ca;a(window).resize(function(){L?a.fn.fullpage.reBuild():(clearTimeout(ca),ca=setTimeout(a.fn.fullpage.reBuild,500))}); a.fn.fullpage.reBuild=function(){D=!0;var c=a(window).width();l=a(window).height();b.resize&&fa(l,c);a(".fp-section").each(function(){parseInt(a(this).css("padding-bottom"));parseInt(a(this).css("padding-top"));b.verticalCentered&&a(this).find(".fp-tableCell").css("height",$(a(this))+"px");a(this).css("height",l+"px");if(b.scrollOverflow){var c=a(this).find(".fp-slide");c.length?c.each(function(){z(a(this))}):z(a(this))}c=a(this).find(".fp-slides");c.length&&q(c,c.find(".fp-slide.active"))});a(".fp-section.active").position(); c=a(".fp-section.active");c.index(".fp-section")&&k(c);D=!1;a.isFunction(b.afterResize)&&b.afterResize.call(this)};a(document).on("click",".fp-slidesNav a",function(b){b.preventDefault();b=a(this).closest(".fp-section").find(".fp-slides");var d=b.find(".fp-slide").eq(a(this).closest("li").index());q(b,d)});a.fn.fullpage.destroy=function(c){a.fn.fullpage.setAutoScrolling(!1);a.fn.fullpage.setAllowScrolling(!1);a.fn.fullpage.setKeyboardScrolling(!1);a(window).off("scroll",N).off("hashchange",W);a(document).off("click", "#fp-nav a").off("mouseenter","#fp-nav li").off("mouseleave","#fp-nav li").off("click",".fp-slidesNav a").off("mouseover",b.normalScrollElements).off("mouseout",b.normalScrollElements);a(".fp-section").off("click",".fp-controlArrow").off("click",".toSlide");c&&ia()}}})(jQuery);
/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * Version: 1.3.2 (modified for fullpage.js) * */
(function(f){jQuery.fn.extend({slimScroll:function(g){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function s(d){d=d||window.event; var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}function m(d,f,g){k=!1;var e=d,h=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),h),e=0<d?Math.ceil(e):Math.floor(e),c.css({top:e+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight()); e=l*(b[0].scrollHeight-b.outerHeight());g&&(e=d,d=e/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),h),c.css({top:d+"px"}));b.scrollTop(e);b.trigger("slimscrolling",~~e);u();p()}function C(){window.addEventListener?(this.addEventListener("DOMMouseScroll",s,!1),this.addEventListener("mousewheel",s,!1)):document.attachEvent("onmousewheel",s)}function v(){r=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),D);c.css({height:r+"px"});var a=r==b.outerHeight()?"none":"block";c.css({display:a})} function u(){v();clearTimeout(A);l==~~l?(k=a.allowPageScroll,B!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;B=l;r>=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&w||x||y||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var w,x,y,A,z,r,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.parent().find("."+a.barClass),h=b.parent().find("."+
a.railClass);v();if(f.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==g.height?b.parent().height():g.height;n=f("").addClass(a.wrapperClass).css({position:"relative", overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=f("").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)}); b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});h.hover(function(){u()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){w=!0;u();p()},function(){w=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&& (m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});v();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
MINNESOTA iGEM 2014
Insert catchy igem tag line here