Skip to content
Snippets Groups Projects
Commit ac60144f authored by Hengran Chu's avatar Hengran Chu
Browse files

Update static/1-1.jpg, static/1-5.jpg, static/2-6.jpg, static/1-component.css,...

Update static/1-1.jpg, static/1-5.jpg, static/2-6.jpg, static/1-component.css, static/1-normalize.css, static/1-demo.css, static/2-component.css, static/2-demo.css, static/2-normalize.css, static/2-set1.css, static/2-set2.css, static/bootstrap.css, static/form.css, static/test.css, static/test1.css, static/1-anime.min.js, static/1-imagesloaded.pkgd.min.js, static/1-main.js, static/2-classie.js, static/2-modernizr.custom.js, static/2-sidebarEffects.js, static/bootstrap.js, static/jquery.js, wiki/pages/communication.html, wiki/pages/attributions.html, wiki/pages/collaborations.html, wiki/pages/contribution.html, wiki/pages/description.html, wiki/pages/education.html, wiki/pages/engineering.html, wiki/pages/entrepreneurship.html, wiki/pages/experiments.html, wiki/pages/hardware.html, wiki/pages/human-practices.html, wiki/pages/implementation.html, wiki/pages/improve.html, wiki/pages/inclusivity.html, wiki/pages/index.html, wiki/pages/measurement.html, wiki/pages/model.html, wiki/pages/notebook.html, wiki/pages/part-collection.html, wiki/pages/partnership.html, wiki/pages/parts.html, wiki/pages/plant.html, wiki/pages/proof-of-concept.html, wiki/pages/results.html, wiki/pages/safety.html, wiki/pages/software.html, wiki/pages/sustainable.html, wiki/pages/team.html
Deleted wiki/footer.html, wiki/layout.html, wiki/wiki-tools.html, wiki/menu.html, wiki/pages/index.html.bak, wiki/pages/members.html, wiki/pages/overview.html, wiki/pages/wiki-tools.html, tools/push-up.sh
parent 090636c8
No related branches found
No related tags found
No related merge requests found
Pipeline #85477 failed
Showing
with 20677 additions and 0 deletions
static/1-1.jpg

90.9 KiB

static/1-5.jpg

40.2 KiB

(function(u,r){"function"===typeof define&&define.amd?define([],r):"object"===typeof module&&module.exports?module.exports=r():u.anime=r()})(this,function(){var u={duration:1E3,delay:0,loop:!1,autoplay:!0,direction:"normal",easing:"easeOutElastic",elasticity:400,round:!1,begin:void 0,update:void 0,complete:void 0},r="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY".split(" "),y,f={arr:function(a){return Array.isArray(a)},obj:function(a){return-1<
Object.prototype.toString.call(a).indexOf("Object")},svg:function(a){return a instanceof SVGElement},dom:function(a){return a.nodeType||f.svg(a)},num:function(a){return!isNaN(parseInt(a))},str:function(a){return"string"===typeof a},fnc:function(a){return"function"===typeof a},und:function(a){return"undefined"===typeof a},nul:function(a){return"null"===typeof a},hex:function(a){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)},rgb:function(a){return/^rgb/.test(a)},hsl:function(a){return/^hsl/.test(a)},
col:function(a){return f.hex(a)||f.rgb(a)||f.hsl(a)}},D=function(){var a={},b={Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a,b){if(0===a||1===a)return a;var d=1-Math.min(b,998)/1E3,g=a/1-1;return-(Math.pow(2,10*g)*Math.sin(2*(g-d/(2*Math.PI)*Math.asin(1))*Math.PI/d))},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,d=4;a<((b=Math.pow(2,--d))-1)/11;);return 1/Math.pow(4,3-d)-7.5625*Math.pow((3*b-2)/22-a,2)}};["Quad",
"Cubic","Quart","Quint","Expo"].forEach(function(a,e){b[a]=function(a){return Math.pow(a,e+2)}});Object.keys(b).forEach(function(c){var e=b[c];a["easeIn"+c]=e;a["easeOut"+c]=function(a,b){return 1-e(1-a,b)};a["easeInOut"+c]=function(a,b){return.5>a?e(2*a,b)/2:1-e(-2*a+2,b)/2};a["easeOutIn"+c]=function(a,b){return.5>a?(1-e(1-2*a,b))/2:(e(2*a-1,b)+1)/2}});a.linear=function(a){return a};return a}(),z=function(a){return f.str(a)?a:a+""},E=function(a){return a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},
F=function(a){if(f.col(a))return!1;try{return document.querySelectorAll(a)}catch(b){return!1}},A=function(a){return a.reduce(function(a,c){return a.concat(f.arr(c)?A(c):c)},[])},t=function(a){if(f.arr(a))return a;f.str(a)&&(a=F(a)||a);return a instanceof NodeList||a instanceof HTMLCollection?[].slice.call(a):[a]},G=function(a,b){return a.some(function(a){return a===b})},R=function(a,b){var c={};a.forEach(function(a){var d=JSON.stringify(b.map(function(b){return a[b]}));c[d]=c[d]||[];c[d].push(a)});
return Object.keys(c).map(function(a){return c[a]})},H=function(a){return a.filter(function(a,c,e){return e.indexOf(a)===c})},B=function(a){var b={},c;for(c in a)b[c]=a[c];return b},v=function(a,b){for(var c in b)a[c]=f.und(a[c])?b[c]:a[c];return a},S=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,b,c,m){return b+b+c+c+m+m});var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);a=parseInt(b[1],16);var c=parseInt(b[2],16),b=parseInt(b[3],16);return"rgb("+a+","+c+","+b+")"},
T=function(a){a=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a);var b=parseInt(a[1])/360,c=parseInt(a[2])/100,e=parseInt(a[3])/100;a=function(a,b,c){0>c&&(c+=1);1<c&&--c;return c<1/6?a+6*(b-a)*c:.5>c?b:c<2/3?a+(b-a)*(2/3-c)*6:a};if(0==c)c=e=b=e;else var d=.5>e?e*(1+c):e+c-e*c,g=2*e-d,c=a(g,d,b+1/3),e=a(g,d,b),b=a(g,d,b-1/3);return"rgb("+255*c+","+255*e+","+255*b+")"},p=function(a){return/([\+\-]?[0-9|auto\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg)?/.exec(a)[2]},I=function(a,b,c){return p(b)?
b:-1<a.indexOf("translate")?p(c)?b+p(c):b+"px":-1<a.indexOf("rotate")||-1<a.indexOf("skew")?b+"deg":b},w=function(a,b){if(b in a.style)return getComputedStyle(a).getPropertyValue(E(b))||"0"},U=function(a,b){var c=-1<b.indexOf("scale")?1:0,e=a.style.transform;if(!e)return c;for(var d=/(\w+)\((.+?)\)/g,g=[],m=[],f=[];g=d.exec(e);)m.push(g[1]),f.push(g[2]);e=f.filter(function(a,c){return m[c]===b});return e.length?e[0]:c},J=function(a,b){if(f.dom(a)&&G(r,b))return"transform";if(f.dom(a)&&(a.getAttribute(b)||
f.svg(a)&&a[b]))return"attribute";if(f.dom(a)&&"transform"!==b&&w(a,b))return"css";if(!f.nul(a[b])&&!f.und(a[b]))return"object"},K=function(a,b){switch(J(a,b)){case "transform":return U(a,b);case "css":return w(a,b);case "attribute":return a.getAttribute(b)}return a[b]||0},L=function(a,b,c){if(f.col(b))return b=f.rgb(b)?b:f.hex(b)?S(b):f.hsl(b)?T(b):void 0,b;if(p(b))return b;a=p(a.to)?p(a.to):p(a.from);!a&&c&&(a=p(c));return a?b+a:b},M=function(a){var b=/-?\d*\.?\d+/g;return{original:a,numbers:z(a).match(b)?
z(a).match(b).map(Number):[0],strings:z(a).split(b)}},V=function(a,b,c){return b.reduce(function(b,d,g){d=d?d:c[g-1];return b+a[g-1]+d})},W=function(a){a=a?A(f.arr(a)?a.map(t):t(a)):[];return a.map(function(a,c){return{target:a,id:c}})},N=function(a,b,c,e){"transform"===c?(c=a+"("+I(a,b.from,b.to)+")",b=a+"("+I(a,b.to)+")"):(a="css"===c?w(e,a):void 0,c=L(b,b.from,a),b=L(b,b.to,a));return{from:M(c),to:M(b)}},X=function(a,b){var c=[];a.forEach(function(e,d){var g=e.target;return b.forEach(function(b){var l=
J(g,b.name);if(l){var q;q=b.name;var h=b.value,h=t(f.fnc(h)?h(g,d):h);q={from:1<h.length?h[0]:K(g,q),to:1<h.length?h[1]:h[0]};h=B(b);h.animatables=e;h.type=l;h.from=N(b.name,q,h.type,g).from;h.to=N(b.name,q,h.type,g).to;h.round=f.col(q.from)||h.round?1:0;h.delay=(f.fnc(h.delay)?h.delay(g,d,a.length):h.delay)/k.speed;h.duration=(f.fnc(h.duration)?h.duration(g,d,a.length):h.duration)/k.speed;c.push(h)}})});return c},Y=function(a,b){var c=X(a,b);return R(c,["name","from","to","delay","duration"]).map(function(a){var b=
B(a[0]);b.animatables=a.map(function(a){return a.animatables});b.totalDuration=b.delay+b.duration;return b})},C=function(a,b){a.tweens.forEach(function(c){var e=c.from,d=a.duration-(c.delay+c.duration);c.from=c.to;c.to=e;b&&(c.delay=d)});a.reversed=a.reversed?!1:!0},Z=function(a){if(a.length)return Math.max.apply(Math,a.map(function(a){return a.totalDuration}))},O=function(a){var b=[],c=[];a.tweens.forEach(function(a){if("css"===a.type||"transform"===a.type)b.push("css"===a.type?E(a.name):"transform"),
a.animatables.forEach(function(a){c.push(a.target)})});return{properties:H(b).join(", "),elements:H(c)}},aa=function(a){var b=O(a);b.elements.forEach(function(a){a.style.willChange=b.properties})},ba=function(a){O(a).elements.forEach(function(a){a.style.removeProperty("will-change")})},ca=function(a,b){var c=a.path,e=a.value*b,d=function(d){d=d||0;return c.getPointAtLength(1<b?a.value+d:e+d)},g=d(),f=d(-1),d=d(1);switch(a.name){case "translateX":return g.x;case "translateY":return g.y;case "rotate":return 180*
Math.atan2(d.y-f.y,d.x-f.x)/Math.PI}},da=function(a,b){var c=Math.min(Math.max(b-a.delay,0),a.duration)/a.duration,e=a.to.numbers.map(function(b,e){var f=a.from.numbers[e],l=D[a.easing](c,a.elasticity),f=a.path?ca(a,l):f+l*(b-f);return f=a.round?Math.round(f*a.round)/a.round:f});return V(e,a.to.strings,a.from.strings)},P=function(a,b){var c;a.currentTime=b;a.progress=b/a.duration*100;for(var e=0;e<a.tweens.length;e++){var d=a.tweens[e];d.currentValue=da(d,b);for(var f=d.currentValue,m=0;m<d.animatables.length;m++){var l=
d.animatables[m],k=l.id,l=l.target,h=d.name;switch(d.type){case "css":l.style[h]=f;break;case "attribute":l.setAttribute(h,f);break;case "object":l[h]=f;break;case "transform":c||(c={}),c[k]||(c[k]=[]),c[k].push(f)}}}if(c)for(e in y||(y=(w(document.body,"transform")?"":"-webkit-")+"transform"),c)a.animatables[e].target.style[y]=c[e].join(" ");a.settings.update&&a.settings.update(a)},Q=function(a){var b={};b.animatables=W(a.targets);b.settings=v(a,u);var c=b.settings,e=[],d;for(d in a)if(!u.hasOwnProperty(d)&&
"targets"!==d){var g=f.obj(a[d])?B(a[d]):{value:a[d]};g.name=d;e.push(v(g,c))}b.properties=e;b.tweens=Y(b.animatables,b.properties);b.duration=Z(b.tweens)||a.duration;b.currentTime=0;b.progress=0;b.ended=!1;return b},n=[],x=0,ea=function(){var a=function(){x=requestAnimationFrame(b)},b=function(b){if(n.length){for(var e=0;e<n.length;e++)n[e].tick(b);a()}else cancelAnimationFrame(x),x=0};return a}(),k=function(a){var b=Q(a),c={};b.tick=function(a){b.ended=!1;c.start||(c.start=a);c.current=Math.min(Math.max(c.last+
a-c.start,0),b.duration);P(b,c.current);var d=b.settings;d.begin&&c.current>=d.delay&&(d.begin(b),d.begin=void 0);c.current>=b.duration&&(d.loop?(c.start=a,"alternate"===d.direction&&C(b,!0),f.num(d.loop)&&d.loop--):(b.ended=!0,b.pause(),d.complete&&d.complete(b)),c.last=0)};b.seek=function(a){P(b,a/100*b.duration)};b.pause=function(){ba(b);var a=n.indexOf(b);-1<a&&n.splice(a,1)};b.play=function(a){b.pause();a&&(b=v(Q(v(a,b.settings)),b));c.start=0;c.last=b.ended?0:b.currentTime;a=b.settings;"reverse"===
a.direction&&C(b);"alternate"!==a.direction||a.loop||(a.loop=1);aa(b);n.push(b);x||ea()};b.restart=function(){b.reversed&&C(b);b.pause();b.seek(0);b.play()};b.settings.autoplay&&b.play();return b};k.version="1.1.1";k.speed=1;k.list=n;k.remove=function(a){a=A(f.arr(a)?a.map(t):t(a));for(var b=n.length-1;0<=b;b--)for(var c=n[b],e=c.tweens,d=e.length-1;0<=d;d--)for(var g=e[d].animatables,k=g.length-1;0<=k;k--)G(a,g[k].target)&&(g.splice(k,1),g.length||e.splice(d,1),e.length||c.pause())};k.easings=D;
k.getValue=K;k.path=function(a){a=f.str(a)?F(a)[0]:a;return{path:a,value:a.getTotalLength()}};k.random=function(a,b){return Math.floor(Math.random()*(b-a+1))+a};return k});
\ No newline at end of file
.segmenter {
width: 100vw;
height: 100vh;
position: relative;
overflow: hidden;
}
.segmenter__image {
width: 100%;
display: block;
}
.segmenter__background,
.segmenter__pieces,
.segmenter__piece-wrap,
.segmenter__piece-parallax,
.segmenter__piece {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.segmenter__piece-parallax {
-webkit-transition: -webkit-transform 0.2s ease-out;
transition: transform 0.2s ease-out;
}
.segmenter__pieces {
-webkit-perspective: 400px;
perspective: 400px;
}
.segmenter__background,
.segmenter__piece {
background-size: cover;
background-repeat: no-repeat;
background-position: 50% 50%;
}
.segmenter__shadow {
position: absolute;
opacity: 0;
box-shadow: 0px 2px 15px rgba(0,0,0,0.7);
}
/* Individual shadow styles */
.demo-1 .segmenter__shadow {
box-shadow: 0px 20px 50px rgba(18, 20, 28, 0.61);
}
.demo-2 .segmenter__shadow {
box-shadow: 10px 10px 30px rgba(43, 27, 19, 0.95);
}
.demo-3 .segmenter__shadow {
border: 7px solid rgba(255,255,255,0.7);
box-shadow: none;
}
.demo-3 .segmenter__shadow::before {
content: '';
position: absolute;
top: -20px;
left: -20px;
width: 100%;
height: 100%;
box-shadow: -5px -5px 30px rgba(0, 0, 0, 0.7);
}
.demo-4 .segmenter__shadow {
box-shadow: 8px 8px 30px rgba(15, 32, 38, 0.35);
}
.demo-5 .segmenter__shadow {
box-shadow: 0px 18px 29px rgba(4, 19, 22, 0.65);
}
.demo-6 .segmenter__shadow {
box-shadow: 2px 20px 35px rgba(25, 23, 20, 0.75);
}
*,
*::after,
*::before {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-family: 'Roboto', 'Avenir Next', sans-serif;
color: #fff;
background: #333;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Buttons */
.btn {
display: inline-block;
cursor: pointer;
text-align: center;
pointer-events: auto;
color: #333;
border: 0;
border-radius: 1.85em;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 0.885em;
padding: 1em 2em;
margin: 0 auto;
background: rgba(251, 224, 148, 0.8);
-webkit-transition: background 0.3s, opacity 0.3s;
transition: background 0.3s, opacity 0.3s;
}
.btn:focus {
outline: none;
}
.btn:hover {
background: rgba(251, 224, 148, 1);
}
.btn--trigger {
width: 15em;
position: absolute;
bottom: 2em;
left: 50%;
margin: 0 0 0 -7.5em;
}
.btn--hidden {
opacity: 0;
pointer-events: none;
}
/* Links */
a {
text-decoration: none;
color: #fbe094;
outline: none;
}
/* Demo colors */
.demo-2 a {}
.demo-2 .btn {}
.demo-2 .btn:hover {}
.demo-2 .trigger-headline { color: #fbe094; }
.demo-2 .github-icon { }
.demo-3 a { color: #b5b5b5; }
.demo-3 .btn { background: rgba(148,147,154,0.7); }
.demo-3 .btn:hover { background: rgba(148,147,154,1); }
.demo-3 .trigger-headline { color: #401fe4; }
.demo-3 .github-icon { fill: #b5b5b5;}
.demo-4 a { color: #d70240; }
.demo-4 .btn { background: rgba(215, 2, 64, 0.7); color: #fff; }
.demo-4 .btn:hover { background: rgba(215, 2, 64,1); }
.demo-4 .trigger-headline { color: #fff; text-shadow: 10px 10px 10px rgba(0,0,0,0.2);}
.demo-4 .github-icon { fill: #d70240;}
.demo-5 a { color: #8a74a0; }
.demo-5 .btn { background: rgba(138, 116, 160, 0.7); color: #fff; }
.demo-5 .btn:hover { background: rgba(138, 116, 160,1); }
.demo-5 .trigger-headline { color: #E61572;}
.demo-5 .github-icon { fill: #8a74a0;}
.demo-6 a { color: #F5F21F; }
.demo-6 .btn { background: rgba(33, 35, 35, 0.7); color: #fff; }
.demo-6 .btn:hover { background: rgba(33, 35, 35, 1); }
.demo-6 .trigger-headline { color: #1D1D1C;}
.demo-6 .github-icon { fill: #F5F21F;}
a:hover,
a:focus {
color: #fff;
}
.hidden {
position: absolute;
overflow: hidden;
width: 0;
height: 0;
pointer-events: none;
}
/* Icons */
.icon {
display: block;
width: 1.5em;
height: 1.5em;
margin: 0 auto;
fill: currentColor;
}
/* Header */
.codrops-header {
position: absolute;
z-index: 100;
top: 0;
left: 0;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
width: 100%;
padding: 0.8em 0.75em;
text-align: left;
}
.codrops-header__title {
font-size: 1em;
margin: 0;
padding: 0 0.75em;
}
.codrops-header__tagline {
margin: 0 6em 0 0;
padding: 0 1em;
}
/* Bottom nav */
.bottom-nav {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
/* Demo links */
.codrops-demos {
font-weight: bold;
text-align: right;
padding: 2em 2.5em 2.5em;
}
.codrops-demos span {
display: inline-block;
margin: 0 1em 0 0;
}
.codrops-demos a {
display: inline-block;
position: relative;
margin: 0 0.5em;
}
.codrops-demos a.current-demo {
color: #fff;
}
.codrops-demos a.current-demo::before {
content: '';
position: absolute;
border: 2px solid #fff;
border-radius: 50%;
width: 2.25em;
height: 2.25em;
top: 50%;
left: 50%;
margin: -1.125em 0 0 -1.125em;
}
/* Top Navigation Style */
.codrops-links {
position: relative;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
white-space: nowrap;
}
.codrops-links::after {
position: absolute;
top: 15%;
left: 50%;
width: 1px;
height: 70%;
background: currentColor;
opacity: 0.7;
content: '';
-webkit-transform: rotate3d(0, 0, 1, 22.5deg);
transform: rotate3d(0, 0, 1, 22.5deg);
}
.codrops-icon {
display: inline-block;
margin: 0.5em;
padding: 0.5em;
}
.github-icon {
fill: #fbe094;
color: #251e1e;
position: absolute;
top: 0;
border: 0;
right: 0;
}
.github-corner:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
@keyframes octocat-wave {
0%,
100% {
transform: rotate(0);
}
20%,
60% {
transform: rotate(-25deg);
}
40%,
80% {
transform: rotate(10deg);
}
}
@media (max-width:500px) {
.github-corner:hover .octo-arm {
animation: none;
}
.github-corner .octo-arm {
animation: octocat-wave 560ms ease-in-out;
}
}
/* Content */
.content {
padding: 3em 0;
}
.trigger-headline {
top: 0;
left: 0;
position: absolute;
font-size: 6vw;
text-transform: uppercase;
pointer-events: none;
line-height: 1;
width: 100%;
height: 100%;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
justify-content: center;
margin: 0;
}
.trigger-headline span {
display: inline-block;
position: relative;
padding: 0 5vw;
-webkit-transition: opacity 2s, -webkit-transform 2s;
transition: opacity 2s, transform 2s;
-webkit-transition-timing-function: cubic-bezier(0.2,1,0.3,1);
transition-timing-function: cubic-bezier(0.2,1,0.3,1);
-webkit-transition-delay: 0.7s;
transition-delay: 0.7s;
}
.js .trigger-headline--hidden span {
pointer-events: none;
opacity: 0;
}
.js .trigger-headline--hidden span:nth-child(1) {
-webkit-transform: translate3d(-100px,0,0);
transform: translate3d(-100px,0,0);
}
.js .trigger-headline--hidden span:nth-child(2) {
-webkit-transform: translate3d(-50px,0,0);
transform: translate3d(-50px,0,0);
}
.js .trigger-headline--hidden span:nth-child(3) {
-webkit-transform: translate3d(-25px,0,0);
transform: translate3d(-25px,0,0);
}
.js .trigger-headline--hidden span:nth-child(4) {
-webkit-transform: translate3d(25px,0,0);
transform: translate3d(25px,0,0);
}
.js .trigger-headline--hidden span:nth-child(5) {
-webkit-transform: translate3d(50px,0,0);
transform: translate3d(50px,0,0);
}
.js .trigger-headline--hidden span:nth-child(6) {
-webkit-transform: translate3d(100px,0,0);
transform: translate3d(100px,0,0);
}
/* Adjustments for some demos */
.demo-4 .trigger-headline span {
-webkit-transition: opacity 2.3s, -webkit-transform 2.3s;
transition: opacity 2.3s, transform 2.3s;
-webkit-transition-timing-function: cubic-bezier(0.2,1,0.3,1);
transition-timing-function: cubic-bezier(0.2,1,0.3,1);
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
}
.js .demo-4 .trigger-headline--hidden span:nth-child(1) {
-webkit-transform: translate3d(200px,0,0);
transform: translate3d(200px,0,0);
}
.js .demo-4 .trigger-headline--hidden span:nth-child(2) {
-webkit-transform: translate3d(100px,0,0);
transform: translate3d(100px,0,0);
}
.js .demo-4 .trigger-headline--hidden span:nth-child(3) {
-webkit-transform: translate3d(50px,0,0);
transform: translate3d(50px,0,0);
}
.js .demo-4 .trigger-headline--hidden span:nth-child(4) {
-webkit-transform: translate3d(-50px,0,0);
transform: translate3d(-50px,0,0);
}
.js .demo-4 .trigger-headline--hidden span:nth-child(5) {
-webkit-transform: translate3d(-100px,0,0);
transform: translate3d(-100px,0,0);
}
.js .demo-4 .trigger-headline--hidden span:nth-child(6) {
-webkit-transform: translate3d(-200px,0,0);
transform: translate3d(-200px,0,0);
}
.demo-5 .trigger-headline span {
-webkit-transition-delay: 0s;
transition-delay: 0s;
}
/* Related demos */
.content--related {
font-weight: bold;
padding: 10em 1em;
text-align: center;
background: #333;
color: #fff;
}
.content__wrap--related {
max-width: 800px;
margin: 0 auto;
}
.media-item {
display: inline-block;
padding: 1em;
vertical-align: top;
-webkit-transition: color 0.3s;
transition: color 0.3s;
}
.media-item__img {
max-width: 100%;
opacity: 0.6;
-webkit-transition: opacity 0.3s;
transition: opacity 0.3s;
}
.media-item:hover .media-item__img,
.media-item:focus .media-item__img {
opacity: 1;
}
.media-item__title {
font-size: 1em;
margin: 0;
padding: 0.5em;
}
@media screen and (max-width:60em) {
.codrops-demos {
margin-bottom: 4em;
text-align: center;
}
}
/*!
* imagesLoaded PACKAGED v4.1.1
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
!function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}(window,function(t,e){function i(t,e){for(var i in e)t[i]=e[i];return t}function n(t){var e=[];if(Array.isArray(t))e=t;else if("number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e}function o(t,e,r){return this instanceof o?("string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=n(t),this.options=i({},this.options),"function"==typeof e?r=e:i(this.options,e),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(function(){this.check()}.bind(this))):new o(t,e,r)}function r(t){this.img=t}function s(t,e){this.url=t,this.element=e,this.img=new Image}var h=t.jQuery,a=t.console;o.prototype=Object.create(e.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),this.options.background===!0&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&d[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=t.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var d={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,t),n=i.exec(e.backgroundImage)}},o.prototype.addImage=function(t){var e=new r(t);this.images.push(e)},o.prototype.addBackground=function(t,e){var i=new s(t,e);this.images.push(i)},o.prototype.check=function(){function t(t,i,n){setTimeout(function(){e.progress(t,i,n)})}var e=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},o.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,t,e)},o.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){var e=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},r.prototype=Object.create(e.prototype),r.prototype.check=function(){var t=this.getIsImageComplete();return t?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},r.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},r.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var t=this.getIsImageComplete();t&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},o.makeJQueryPlugin=function(e){e=e||t.jQuery,e&&(h=e,h.fn.imagesLoaded=function(t,e){var i=new o(this,t,e);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
\ No newline at end of file
/**
* main.js
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2016, Codrops
* http://www.codrops.com
*/
;(function(window) {
'use strict';
// Helper vars and functions.
function extend( a, b ) {
for( var key in b ) {
if( b.hasOwnProperty( key ) ) {
a[key] = b[key];
}
}
return a;
}
// From https://davidwalsh.name/javascript-debounce-function.
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};
// Creates a sorted array of random numbers between minVal and maxVal with a length = size.
function createRandIntOrderedArray(minVal, maxVal, size) {
var arr = [];
for(var i=0; i<size; ++i) {
arr.push(anime.random(minVal, maxVal));
}
arr.sort(function(a, b){ return a-b });
return arr;
}
// Checks if an object is empty.
function isObjEmpty(obj) {
return Object.getOwnPropertyNames(obj).length > 0;
}
// Concatenate JS objs.
// From http://stackoverflow.com/a/2454315.
function collect() {
var ret = {};
var len = arguments.length;
for (var i=0; i<len; i++) {
for (var p in arguments[i]) {
if (arguments[i].hasOwnProperty(p)) {
ret[p] = arguments[i][p];
}
}
}
return ret;
}
// Check if clip-path is supported. From http://stackoverflow.com/a/30041538.
function areClipPathShapesSupported() {
var base = 'clipPath',
prefixes = [ 'webkit', 'moz', 'ms', 'o' ],
properties = [ base ],
testElement = document.createElement( 'testelement' ),
attribute = 'polygon(50% 0%, 0% 100%, 100% 100%)';
// Push the prefixed properties into the array of properties.
for ( var i = 0, l = prefixes.length; i < l; i++ ) {
var prefixedProperty = prefixes[i] + base.charAt( 0 ).toUpperCase() + base.slice( 1 ); // remember to capitalize!
properties.push( prefixedProperty );
}
// Interate over the properties and see if they pass two tests.
for ( var i = 0, l = properties.length; i < l; i++ ) {
var property = properties[i];
// First, they need to even support clip-path (IE <= 11 does not)...
if ( testElement.style[property] === '' ) {
// Second, we need to see what happens when we try to create a CSS shape...
testElement.style[property] = attribute;
if ( testElement.style[property] !== '' ) {
return true;
}
}
}
return false;
};
/**
* Segmenter obj.
*/
function Segmenter(el, options) {
this.el = el;
this.options = extend({}, this.options);
extend(this.options, options);
// Preload main image.
var self = this;
imagesLoaded(this.el, { background: true }, function() {
self._init();
self._initEvents();
self.options.onReady();
});
}
Segmenter.prototype.options = {
// Number of pieces.
pieces: 4,
// Show pieces already styled.
renderOnLoad: false,
// Add an element for the shadow.
shadows: true,
// Animations for the shadow (valid properties: opacity, translateX, translateY).
shadowsAnimation: {
opacity: 1,
// translateX: 20,
// translateY: 20
},
// Parrallax effect for the pieces.
parallax: false,
// Movements for the parallax effect.
parallaxMovement: {min: 10, max: 40},
// Animation for the pieces (valid properties: duration, easing, delay, opacity, translate[XYZ]).
animation: {
duration: 1500,
easing: 'easeOutQuad',
delay: 0, // Delay increment per piece.
// opacity: 0.5,
translateZ: {min: 10, max: 65}, // We can also use an integer for a specific value.
// translateX: {min: -100, max: 100}, // We can also use an integer for a specific value.
// translateY: {min: -100, max: 100} // We can also use an integer for a specific value.
},
// Callbacks
onReady: function() { return false; },
onAnimationComplete: function() { return false; },
onAnimationStart: function() { return false; },
// The positions of the pieces in percentage values.
// We can also use random values by setting options.positions to "random".
positions: [
{top: 80, left: 10, width: 30, height: 20},
{top: 2, left: 2, width: 40, height: 40},
{top: 30, left: 60, width: 30, height: 60},
{top: 10, left: 20, width: 50, height: 60}
]
};
/**
* Init!
*/
Segmenter.prototype._init = function() {
// The dimensions of the main element.
this.dimensions = {
width: this.el.offsetWidth,
height: this.el.offsetHeight
};
// The source of the main image.
var background = this.el.style.backgroundImage;
this.imgsrc = background.replace('url(','').replace(')','').replace(/\"/gi, "");;
// Create the layout.
this._layout();
var self = this;
this.pieces = [].slice.call(this.el.querySelectorAll('.segmenter__piece-wrap'));
this.pieces.forEach(function(piece, pos) {
// Bugfix for Chrome. The translateZ needs an initial value otherwise the animation will not work. (this seems to be a anime.js bug - let´s wait for the next version..)
piece.style.WebkitTransform = piece.style.transform = 'translateZ(0.0001px)';
// If we want to render the different pieces on load then:
if( self.options.renderOnLoad ) {
self._renderPiece(piece);
}
});
// Flag to indicate the pieces are already rendered/styled either on load or after the animation.
if( this.options.renderOnLoad ) {
this.active = true;
}
};
/**
* Creates the layout.
*/
Segmenter.prototype._layout = function() {
// clip-path support
var clipPath = areClipPathShapesSupported();
var segBgEl = document.createElement('div');
segBgEl.className = 'segmenter__background';
segBgEl.style.backgroundImage = 'url(' + this.imgsrc + ')';
var segPieces = document.createElement('div'),
segPiecesHTML = '',
positionsTotal = this.options.positions.length;
segPieces.className = 'segmenter__pieces';
for(var i = 0, len = this.options.pieces; i < len; ++i) {
if( this.options.parallax ) {
segPiecesHTML += '<div class="segmenter__piece-parallax">';
}
segPiecesHTML += '<div class="segmenter__piece-wrap">';
var top, left, width, height, clipTop, clipLeft, clipRight, clipBottom,
pos = i <= positionsTotal - 1 ? i : 0,
isRandom = this.options.positions === 'random';
top = isRandom ? anime.random(0,100) : this.options.positions[pos].top;
left = isRandom ? anime.random(0,100) : this.options.positions[pos].left;
width = isRandom ? anime.random(0,100) : this.options.positions[pos].width;
height = isRandom ? anime.random(0,100) : this.options.positions[pos].height;
if( !clipPath ) {
clipTop = isRandom ? top/100 * this.dimensions.height : this.options.positions[pos].top/100 * this.dimensions.height;
clipLeft = isRandom ? left/100 * this.dimensions.width : this.options.positions[pos].left/100 * this.dimensions.width;
clipRight = isRandom ? width/100 * this.dimensions.width + clipLeft : this.options.positions[pos].width/100 * this.dimensions.width + clipLeft;
clipBottom = isRandom ? height/100 * this.dimensions.height + clipTop : this.options.positions[pos].height/100 * this.dimensions.height + clipTop;
}
if( this.options.shadows ) {
segPiecesHTML += '<div class="segmenter__shadow" style="top: ' + top + '%; left: ' + left + '%; width: ' + width + '%; height: ' + height + '%"></div>';
}
segPiecesHTML += clipPath ?
'<div class="segmenter__piece" style="background-image: url(' + this.imgsrc + '); -webkit-clip-path: polygon(' + left + '% ' + top + '%, ' + (left + width) + '% ' + top + '%, ' + (left + width) + '% ' + (top + height) + '%, ' + left + '% ' + (top + height) + '%); clip-path: polygon(' + left + '% ' + top + '%, ' + (left + width) + '% ' + top + '%, ' + (left + width) + '% ' + (top + height) + '%, ' + left + '% ' + (top + height) + '%)"></div>' :
'<div class="segmenter__piece" style="background-image: url(' + this.imgsrc + '); clip: rect(' + clipTop + 'px,' + clipRight + 'px,' + clipBottom + 'px,' + clipLeft + 'px)"></div>';
segPiecesHTML += '</div>'
if( this.options.parallax ) {
segPiecesHTML += '</div>';
}
}
segPieces.innerHTML = segPiecesHTML;
this.el.innerHTML = '';
this.el.appendChild(segBgEl);
this.el.appendChild(segPieces);
};
/**
* Renders/Styles a piece with the options that are passed in the initialization.
*/
Segmenter.prototype._renderPiece = function(piece) {
var idx = this.pieces.indexOf(piece);
var self = this;
if( self.options.animation.translateZ != undefined ) {
if( typeof self.options.animation.translateZ === 'object' ) {
var randArr = createRandIntOrderedArray(self.options.animation.translateZ.min, self.options.animation.translateZ.max, self.options.pieces);
piece.style.transform = piece.style.WebkitTransform = 'translateZ(' + randArr[idx] + 'px)';
}
else {
piece.style.transform = piece.style.WebkitTransform = 'translateZ(' + self.options.animation.translateZ + 'px)';
}
}
if( self.options.animation.translateY != undefined ) {
if( typeof self.options.animation.translateY === 'object' ) {
var randArr = createRandIntOrderedArray(self.options.animation.translateY.min, self.options.animation.translateY.max, self.options.pieces);
piece.style.transform = piece.style.WebkitTransform = 'translateY(' + randArr[idx] + 'px)';
}
else {
piece.style.transform = piece.style.WebkitTransform = 'translateY(' + self.options.animation.translateY + 'px)';
}
}
if( self.options.animation.translateX != undefined ) {
if( typeof self.options.animation.translateX === 'object' ) {
var randArr = createRandIntOrderedArray(self.options.animation.translateX.min, self.options.animation.translateX.max, self.options.pieces);
piece.style.transform = piece.style.WebkitTransform = 'translateX(' + randArr[idx] + 'px)';
}
else {
piece.style.transform = piece.style.WebkitTransform = 'translateX(' + self.options.animation.translateX + 'px)';
}
}
if( self.options.animation.opacity != undefined ) {
piece.style.opacity = self.options.animation.opacity;
}
if( self.options.shadows && isObjEmpty(self.options.shadowsAnimation) ) {
var shadowEl = piece.querySelector('.segmenter__shadow');
shadowEl.style.opacity = self.options.shadowsAnimation.opacity != undefined ? self.options.shadowsAnimation.opacity : 0;
shadowEl.style.transform = shadowEl.style.WebkitTransform = 'translateX(' + (self.options.shadowsAnimation.translateX != undefined ? self.options.shadowsAnimation.translateX : 0) + 'px) translateY(' + (self.options.shadowsAnimation.translateY != undefined ? self.options.shadowsAnimation.translateY : 0) + 'px)';
}
};
/**
* Animates the pieces with the options passed (with anime.js).
*/
Segmenter.prototype.animate = function() {
if( this.active ) {
return false;
}
this.active = true;
var self = this,
animProps = {
targets: this.pieces,
duration: this.options.animation.duration,
delay: function(el, index) { return (self.options.pieces - index - 1) * self.options.animation.delay; },
easing: this.options.animation.easing,
begin: this.options.onAnimationStart,
complete: this.options.onAnimationComplete
};
if( this.options.animation.translateZ != undefined ) {
var randArr = createRandIntOrderedArray(this.options.animation.translateZ.min, this.options.animation.translateZ.max, this.options.pieces);
animProps.translateZ = typeof this.options.animation.translateZ === 'object' ? function(el, index) {
return randArr[index];
} : this.options.animation.translateZ;
}
if( this.options.animation.translateX != undefined ) {
animProps.translateX = typeof this.options.animation.translateX === 'object' ? function(el, index) {
return anime.random(self.options.animation.translateX.min, self.options.animation.translateX.max);
} : this.options.animation.translateX;
}
if( this.options.animation.translateY != undefined ) {
animProps.translateY = typeof this.options.animation.translateY === 'object' ? function(el, index) {
return anime.random(self.options.animation.translateY.min, self.options.animation.translateY.max);
} : this.options.animation.translateY;
}
if( this.options.animation.opacity != undefined ) {
animProps.opacity = this.options.animation.opacity;
}
anime(animProps);
// Also animate the shadow element.
if( this.options.shadows && isObjEmpty(this.options.shadowsAnimation) ) {
anime(collect({
targets: this.el.querySelectorAll('.segmenter__shadow'),
duration: this.options.animation.duration,
delay: function(el, index) { return (self.options.pieces - index - 1) * self.options.animation.delay; },
easing: this.options.animation.easing
}, this.options.shadowsAnimation));
}
};
/**
* Init/Bind events.
*/
Segmenter.prototype._initEvents = function() {
var self = this;
// Window resize.
this.debounceResize = debounce(function(ev) {
var positionsTotal = self.options.positions.length;
// Recalculate dimensions.
self.dimensions = {
width: self.el.offsetWidth,
height: self.el.offsetHeight
};
// Recalculate clip values..
// todo: DRY
// todo: If random is true then save the initial values. Should not recalculate for this case.
self.pieces.forEach(function(piece, position) {
var clipTop, clipLeft, clipRight, clipBottom,
segmenterPiece = piece.querySelector('.segmenter__piece');
if( self.options.positions === 'random' ) {
var randT = anime.random(0,100), randL = anime.random(0,100), randW = anime.random(0,100), randH = anime.random(0,100);
clipTop = randT/100 * self.dimensions.height;
clipLeft = randL/100 * self.dimensions.width;
clipRight = randW/100 * self.dimensions.width + clipLeft;
clipBottom = randH/100 * self.dimensions.height + clipTop;
}
else {
var pos = position <= positionsTotal - 1 ? position : 0;
clipTop = self.options.positions[pos].top/100 * self.dimensions.height;
clipLeft = self.options.positions[pos].left/100 * self.dimensions.width;
clipRight = self.options.positions[pos].width/100 * self.dimensions.width + clipLeft;
clipBottom = self.options.positions[pos].height/100 * self.dimensions.height + clipTop;
}
segmenterPiece.style.clip = 'rect(' + clipTop + 'px,' + clipRight + 'px,' + clipBottom + 'px,' + clipLeft + 'px)';
});
}, 10);
window.addEventListener('resize', this.debounceResize);
// Mousemove and Deviceorientation:
if( this.options.parallax ) {
var arrRand = createRandIntOrderedArray(this.options.parallaxMovement.min, this.options.parallaxMovement.max, this.options.pieces);
this.pieces.forEach(function(piece, pos) {
piece.setAttribute('data-parallax-translation', typeof self.options.parallaxMovement === 'object' ? arrRand[pos] : self.options.parallaxMovement );
});
this.mousemove = function(ev) {
if( !self.active ) {
return false;
}
requestAnimationFrame(function() {
self.pieces.forEach(function(piece) {
var t = piece.getAttribute('data-parallax-translation'),
transX = t/(self.dimensions.width)*ev.clientX - t/2,
transY = t/(self.dimensions.height)*ev.clientY - t/2;
piece.parentNode.style.transform = piece.parentNode.style.WebkitTransform = 'translate3d(' + transX + 'px,' + transY + 'px,0)';
});
});
};
window.addEventListener('mousemove', this.mousemove);
this.handleOrientation = function() {
if( !self.active ) {
return false;
}
var y = event.gamma;
// To make computation easier we shift the range of x and y to [0,180]
y += 90;
requestAnimationFrame(function() {
self.pieces.forEach(function(piece) {
var t = piece.getAttribute('data-parallax-translation'),
transX = t/(self.dimensions.width)*y - t/2,
transY = t/(self.dimensions.height)*y - t/2;
piece.parentNode.style.transform = piece.parentNode.style.WebkitTransform = 'translate3d(' + transX + 'px,' + transY + 'px,0)';
});
});
}
window.addEventListener('deviceorientation', this.handleOrientation);
}
};
window.Segmenter = Segmenter;
})(window);
\ No newline at end of file
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;}
\ No newline at end of file
static/2-6.jpg

31.3 KiB

/*!
* classie - class helper functions
* from bonzo https://github.com/ded/bonzo
*
* classie.has( elem, 'my-class' ) -> true/false
* classie.add( elem, 'my-new-class' )
* classie.remove( elem, 'my-unwanted-class' )
* classie.toggle( elem, 'my-class' )
*/
/*jshint browser: true, strict: true, undef: true */
/*global define: false */
( function( window ) {
'use strict';
// class helper functions from bonzo https://github.com/ded/bonzo
function classReg( className ) {
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
}
// classList support for class management
// altho to be fair, the api sucks because it won't accept multiple classes at once
var hasClass, addClass, removeClass;
if ( 'classList' in document.documentElement ) {
hasClass = function( elem, c ) {
return elem.classList.contains( c );
};
addClass = function( elem, c ) {
elem.classList.add( c );
};
removeClass = function( elem, c ) {
elem.classList.remove( c );
};
}
else {
hasClass = function( elem, c ) {
return classReg( c ).test( elem.className );
};
addClass = function( elem, c ) {
if ( !hasClass( elem, c ) ) {
elem.className = elem.className + ' ' + c;
}
};
removeClass = function( elem, c ) {
elem.className = elem.className.replace( classReg( c ), ' ' );
};
}
function toggleClass( elem, c ) {
var fn = hasClass( elem, c ) ? removeClass : addClass;
fn( elem, c );
}
var classie = {
// full names
hasClass: hasClass,
addClass: addClass,
removeClass: removeClass,
toggleClass: toggleClass,
// short names
has: hasClass,
add: addClass,
remove: removeClass,
toggle: toggleClass
};
// transport
if ( typeof define === 'function' && define.amd ) {
// AMD
define( classie );
} else {
// browser global
window.classie = classie;
}
})( window );
*,
*:after,
*::before {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
a {
text-decoration: none;
}
html,
body,
.st-container,
.st-pusher,
.st-content {
height: 100%;
}
.st-content {
overflow-y: scroll;
background: #f3efe0;
}
.st-content,
.st-content-inner {
position: relative;
}
.st-container {
position: relative;
overflow: hidden;
}
.st-pusher {
position: relative;
left: 0;
z-index: 99;
height: 100%;
perspective: 1000px;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
}
.st-pusher::after {
position: absolute;
top: 0;
right: 0;
width: 0;
height: 0;
background: rgba(0,0,0,0.2);
content: '';
opacity: 0;
-webkit-transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
}
.st-menu-open .st-pusher::after {
width: 100%;
height: 100%;
opacity: 1;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
.st-menu {
position: absolute;
top: 0;
left: 0;
z-index: 100;
visibility: hidden;
width: 300px;
height: 100%;
background: #48a770;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.st-menu::after {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.2);
content: '';
opacity: 1;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
.st-menu-open .st-menu::after {
width: 0;
height: 0;
opacity: 0;
-webkit-transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
}
/* content style */
.st-menu ul {
margin: 0;
padding: 0;
list-style: none;
}
.st-menu h2 {
margin: 0;
padding: 1em;
color: rgba(0,0,0,0.4);
text-shadow: 0 0 1px rgba(0,0,0,0.1);
font-weight: 300;
font-size: 2em;
}
.st-menu ul li a {
display: block;
padding: 1em 1em 1em 1.2em;
outline: none;
box-shadow: inset 0 -1px rgba(0,0,0,0.2);
color: #f3efe0;
text-transform: uppercase;
text-shadow: 0 0 1px rgba(255,255,255,0.1);
letter-spacing: 1px;
font-weight: 400;
-webkit-transition: background 0.3s, box-shadow 0.3s;
transition: background 0.3s, box-shadow 0.3s;
}
.st-menu ul li:first-child a {
box-shadow: inset 0 -1px rgba(0,0,0,0.2), inset 0 1px rgba(0,0,0,0.2);
}
.st-menu ul li a:hover {
background: rgba(0,0,0,0.2);
box-shadow: inset 0 -1px rgba(0,0,0,0);
color: #fff;
}
/* Individual effects */
/* Effect 1: Slide in on top */
.st-effect-1.st-menu {
visibility: visible;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.st-effect-1.st-menu-open .st-effect-1.st-menu {
visibility: visible;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.st-effect-1.st-menu::after {
display: none;
}
/* Effect 2: Reveal */
.st-effect-2.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-2.st-menu {
z-index: 1;
}
.st-effect-2.st-menu-open .st-effect-2.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
}
.st-effect-2.st-menu::after {
display: none;
}
/* Effect 3: Push*/
.st-effect-3.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-3.st-menu {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.st-effect-3.st-menu-open .st-effect-3.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
}
.st-effect-3.st-menu::after {
display: none;
}
/* Effect 4: Slide along */
.st-effect-4.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-4.st-menu {
z-index: 1;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
}
.st-effect-4.st-menu-open .st-effect-4.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.st-effect-4.st-menu::after {
display: none;
}
/* Effect 5: Reverse slide out */
.st-effect-5.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-5.st-menu {
z-index: 1;
-webkit-transform: translate3d(50%, 0, 0);
transform: translate3d(50%, 0, 0);
}
.st-effect-5.st-menu-open .st-effect-5.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/* Effect 6: Rotate pusher */
.st-effect-6.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
}
.st-effect-6 .st-pusher {
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-6.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0) rotateY(-15deg);
transform: translate3d(300px, 0, 0) rotateY(-15deg);
pointer-events: none;
}
.st-effect-6.st-menu {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-6.st-menu-open .st-effect-6.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(-100%, 0, 0) rotateY(15deg);
transform: translate3d(-100%, 0, 0) rotateY(15deg);
}
.st-effect-6.st-menu::after {
display: none;
}
/* Effect 7: 3D rotate in */
.st-effect-7.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
-webkit-perspective-origin: 0% 50%;
perspective-origin: 0% 50%;
}
.st-effect-7 .st-pusher {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-7.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-7.st-menu {
-webkit-transform: translate3d(-100%, 0, 0) rotateY(-90deg);
transform: translate3d(-100%, 0, 0) rotateY(-90deg);
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
z-index: 0;
}
.st-effect-7.st-menu-open .st-effect-7.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(-100%, 0, 0) rotateY(0deg);
transform: translate3d(-100%, 0, 0) rotateY(0deg);
}
/* Effect 8: 3D rotate out */
.st-effect-8.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
-webkit-perspective-origin: 0% 50%;
perspective-origin: 0% 50%;
}
.st-effect-8 .st-pusher {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-8.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-8.st-menu {
-webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg);
transform: translate3d(-100%, 0, 0) rotateY(90deg);
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-8.st-menu-open .st-effect-8.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(-100%, 0, 0) rotateY(0deg);
transform: translate3d(-100%, 0, 0) rotateY(0deg);
}
.st-effect-8.st-menu::after {
display: none;
}
/* Effect 9: Scale down pusher */
.st-effect-9.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
}
.st-effect-9 .st-pusher {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-9.st-menu-open .st-pusher {
-webkit-transform: translate3d(0, 0, -300px);
transform: translate3d(0, 0, -300px);
}
.st-effect-9.st-menu {
opacity: 1;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.st-effect-9.st-menu-open .st-effect-9.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.st-effect-9.st-menu::after {
display: none;
}
/* Effect 10: Scale up */
.st-effect-10.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
-webkit-perspective-origin: 0% 50%;
perspective-origin: 0% 50%;
}
.st-effect-10.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-10.st-menu {
z-index: 1;
opacity: 1;
-webkit-transform: translate3d(0, 0, -300px);
transform: translate3d(0, 0, -300px);
}
.st-effect-10.st-menu-open .st-effect-10.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
/* Effect 11: Scale and rotate pusher */
.st-effect-11.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
}
.st-effect-11 .st-pusher {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-11.st-menu-open .st-pusher {
-webkit-transform: translate3d(100px, 0, -600px) rotateY(-20deg);
transform: translate3d(100px, 0, -600px) rotateY(-20deg);
}
.st-effect-11.st-menu {
opacity: 1;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.st-effect-11.st-menu-open .st-effect-11.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.st-effect-11.st-menu::after {
display: none;
}
/* Effect 12: Open door */
.st-effect-12.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
}
.st-effect-12 .st-pusher {
-webkit-transform-origin: 100% 50%;
transform-origin: 100% 50%;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-12.st-menu-open .st-pusher {
-webkit-transform: rotateY(-10deg);
transform: rotateY(-10deg);
}
.st-effect-12.st-menu {
opacity: 1;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
.st-effect-12.st-menu-open .st-effect-12.st-menu {
visibility: visible;
-webkit-transition: -webkit-transform 0.5s;
transition: transform 0.5s;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.st-effect-12.st-menu::after {
display: none;
}
/* Effect 13: Fall down */
.st-effect-13.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
-webkit-perspective-origin: 0% 50%;
perspective-origin: 0% 50%;
}
.st-effect-13.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-13.st-menu {
z-index: 1;
opacity: 1;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
.st-effect-13.st-menu-open .st-effect-13.st-menu {
visibility: visible;
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
-webkit-transition-property: -webkit-transform;
transition-property: transform;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-transition-speed: 0.2s;
transition-speed: 0.2s;
}
/* Effect 14: Delayed 3D rotate */
.st-effect-14.st-container {
-webkit-perspective: 1500px;
perspective: 1500px;
-webkit-perspective-origin: 0% 50%;
perspective-origin: 0% 50%;
}
.st-effect-14 .st-pusher {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.st-effect-14.st-menu-open .st-pusher {
-webkit-transform: translate3d(300px, 0, 0);
transform: translate3d(300px, 0, 0);
}
.st-effect-14.st-menu {
-webkit-transform: translate3d(-100%, 0, 0) rotateY(90deg);
transform: translate3d(-100%, 0, 0) rotateY(90deg);
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
z-index: 0;
}
.st-effect-14.st-menu-open .st-effect-14.st-menu {
visibility: visible;
-webkit-transition-delay: 0.1s;
transition-delay: 0.1s;
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
-webkit-transition-property: -webkit-transform;
transition-property: transform;
-webkit-transform: translate3d(-100%, 0, 0) rotateY(0deg);
transform: translate3d(-100%, 0, 0) rotateY(0deg);
}
/* Fallback example for browsers that don't support 3D transforms (and no JS fallback) */
.no-csstransforms3d .st-pusher,
.no-js .st-pusher {
padding-left: 300px;
}
@font-face {
font-weight: normal;
font-style: normal;
font-family: 'codropsicons';
src:url('../fonts/codropsicons/codropsicons.eot');
src:url('../fonts/codropsicons/codropsicons.eot?#iefix') format('embedded-opentype'),
url('../fonts/codropsicons/codropsicons.woff') format('woff'),
url('../fonts/codropsicons/codropsicons.ttf') format('truetype'),
url('../fonts/codropsicons/codropsicons.svg#codropsicons') format('svg');
}
*, *:after, *:before { -webkit-box-sizing: border-box; box-sizing: border-box; }
.clearfix:before, .clearfix:after { display: table; content: ''; }
.clearfix:after { clear: both; }
body {
background: #2f3238;
color: #fff;
font-weight: 400;
font-size: 1em;
font-family: 'Raleway', Arial, sans-serif;
}
a {
outline: none;
color: #3498db;
text-decoration: none;
}
a:hover, a:focus {
color: #528cb3;
}
section {
padding: 1em;
text-align: center;
}
.content {
margin: 0 auto;
max-width: 1000px;
}
.content > h2 {
clear: both;
margin: 0;
padding: 4em 1% 0;
color: #484B54;
font-weight: 800;
font-size: 1.5em;
}
.content > h2:first-child {
padding-top: 0em;
}
/* Header */
.codrops-header {
margin: 0 auto;
padding: 4em 1em;
text-align: center;
}
.codrops-header h1 {
margin: 0;
font-weight: 800;
font-size: 4em;
line-height: 1.3;
}
.codrops-header h1 span {
display: block;
padding: 0 0 0.6em 0.1em;
color: #74777b;
font-weight: 300;
font-size: 45%;
}
/* Demo links */
.codrops-demos {
clear: both;
padding: 1em 0 0;
text-align: center;
}
.content + .codrops-demos {
padding-top: 5em;
}
.codrops-demos a {
display: inline-block;
margin: 0 5px;
padding: 1em 1.5em;
text-transform: uppercase;
font-weight: bold;
}
.codrops-demos a:hover,
.codrops-demos a:focus,
.codrops-demos a.current-demo {
background: #3c414a;
color: #fff;
}
/* To Navigation Style */
.codrops-top {
width: 100%;
text-transform: uppercase;
font-weight: 800;
font-size: 0.69em;
line-height: 2.2;
}
.codrops-top a {
display: inline-block;
padding: 1em 2em;
text-decoration: none;
letter-spacing: 1px;
}
.codrops-top span.right {
float: right;
}
.codrops-top span.right a {
display: block;
float: left;
}
.codrops-icon:before {
margin: 0 4px;
text-transform: none;
font-weight: normal;
font-style: normal;
font-variant: normal;
font-family: 'codropsicons';
line-height: 1;
speak: none;
-webkit-font-smoothing: antialiased;
}
.codrops-icon-drop:before {
content: "\e001";
}
.codrops-icon-prev:before {
content: "\e004";
}
/* Related demos */
.related {
clear: both;
padding: 6em 1em;
font-size: 120%;
}
.related > a {
display: inline-block;
margin: 20px 10px;
padding: 25px;
border: 1px solid #4f7f90;
text-align: center;
}
.related a:hover {
border-color: #39545e;
}
.related a img {
max-width: 100%;
opacity: 0.8;
}
.related a:hover img,
.related a:active img {
opacity: 1;
}
.related a h3 {
margin: 0;
padding: 0.5em 0 0.3em;
max-width: 300px;
text-align: left;
}
@media screen and (max-width: 25em) {
.codrops-header {
font-size: 75%;
}
.codrops-icon span {
display: none;
}
.content {
padding: 0 10px;
text-align: center;
}
}
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-csstransforms3d-shiv-cssclasses-teststyles-testprop-testallprops-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=u.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.csstransforms3d=function(){var a=!!F("perspective");return a&&"webkitPerspective"in g.style&&w("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden]{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:0.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/**
* sidebarEffects.js v1.0.0
* http://www.codrops.com
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Copyright 2013, Codrops
* http://www.codrops.com
*/
var SidebarMenuEffects = (function() {
function hasParentClass( e, classname ) {
if(e === document) return false;
if( classie.has( e, classname ) ) {
return true;
}
return e.parentNode && hasParentClass( e.parentNode, classname );
}
// http://coveroverflow.com/a/11381730/989439
function mobilecheck() {
var check = false;
(function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
return check;
}
function init() {
var container = document.getElementById( 'st-container' ),
reset = document.getElementById( 'closeMenu' ),
buttons = Array.prototype.slice.call( document.querySelectorAll( '#st-trigger-effects > button' ) ),
// event type (if mobile use touch events)
eventtype = mobilecheck() ? 'touchstart' : 'click',
resetMenu = function() {
classie.remove( container, 'st-menu-open' );
},
bodyClickFn = function(evt) {
if( !hasParentClass( evt.target, 'st-menu' ) ) {
resetMenu();
document.removeEventListener( eventtype, bodyClickFn );
}
},
resetClickFn = function(evt) {
if (evt.target == reset) {
resetMenu();
document.removeEventListener(eventtype, bodyClickFn);
}
};
buttons.forEach( function( el, i ) {
var effect = el.getAttribute( 'data-effect' );
el.addEventListener( eventtype, function( ev ) {
ev.stopPropagation();
ev.preventDefault();
container.className = 'st-container'; // clear
classie.add( container, effect );
setTimeout( function() {
classie.add( container, 'st-menu-open' );
}, 25 );
document.addEventListener( eventtype, bodyClickFn );
document.addEventListener( eventtype, resetClickFn );
});
} );
}
init();
})();
This diff is collapsed.
This diff is collapsed.
body{
background-color: rgb(119,115,110);
}
ul{
list-style:none;
position: absolute;
padding:0;
top:0;
left:0;
right:0;
bottom:0;
margin:auto;
width:800px;
height:200px;
}
ul:hover{
cursor: pointer;
}
li{
float:left;
position: absolute;
left: 0px;
transition-duration: 0.4s;
}
div{
width:50px;
height:5px;
border:1px solid rgb(156,156,156);
bottom: -80px;
position:absolute;
background-color:white;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment