Moved into folder
Reason: Dockerfile, README, circleci stuff aren't delivered publicly
This commit is contained in:
		
							
								
								
									
										12
									
								
								web/js/EasePack.min.js
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								web/js/EasePack.min.js
									
									
									
									
										vendored
									
									
										Executable file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| /*! | ||||
|  * VERSION: beta 1.9.4 | ||||
|  * DATE: 2014-07-17 | ||||
|  * UPDATES AND DOCS AT: http://www.greensock.com | ||||
|  * | ||||
|  * @license Copyright (c) 2008-2014, GreenSock. All rights reserved. | ||||
|  * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for | ||||
|  * Club GreenSock members, the software agreement that was issued with your membership. | ||||
|  *  | ||||
|  * @author: Jack Doyle, jack@greensock.com | ||||
|  **/ | ||||
| var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=_gsScope.GreenSockGlobals||_gsScope,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,h=n._class,l=function(e,i){var s=h("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},_=t.register||function(){},u=function(t,e,i,s){var r=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return _(r,t),r},c=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},p=function(e,i){var s=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},f=u("Back",p("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),p("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),p("BackInOut",function(t){return 1>(t*=2)?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),m=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=i===!0},!0),d=m.prototype=new t;return d.constructor=m,d.getRatio=function(t){var e=t+(.5-t)*this._p;return this._p1>t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},m.ease=new m(.7,.7),d.config=m.config=function(t,e,i){return new m(t,e,i)},e=h("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),d=e.prototype=new t,d.constructor=e,d.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},d.config=e.config=function(t){return new e(t)},i=h("easing.RoughEase",function(e){e=e||{};for(var i,s,r,n,a,o,h=e.taper||"none",l=[],_=0,u=0|(e.points||20),p=u,f=e.randomize!==!1,m=e.clamp===!0,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--p>-1;)i=f?Math.random():1/u*p,s=d?d.getRatio(i):i,"none"===h?r=g:"out"===h?(n=1-i,r=n*n*g):"in"===h?r=i*i*g:.5>i?(n=2*i,r=.5*n*n*g):(n=2*(1-i),r=.5*n*n*g),f?s+=Math.random()*r-.5*r:p%2?s+=.5*r:s-=.5*r,m&&(s>1?s=1:0>s&&(s=0)),l[_++]={x:i,y:s};for(l.sort(function(t,e){return t.x-e.x}),o=new c(1,1,null),p=u;--p>-1;)a=l[p],o=new c(a.x,a.y,o);this._prev=new c(0,0,0!==o.t?o:o.next)},!0),d=i.prototype=new t,d.constructor=i,d.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},d.config=function(t){return new i(t)},i.ease=new i,u("Bounce",l("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),l("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),l("BounceInOut",function(t){var e=.5>t;return t=e?1-2*t:2*t-1,t=1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",l("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),l("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),l("CircInOut",function(t){return 1>(t*=2)?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),s=function(e,i,s){var r=h("easing."+e,function(t,e){this._p1=t||1,this._p2=e||s,this._p3=this._p2/a*(Math.asin(1/this._p1)||0)},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r},u("Elastic",s("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*a/this._p2)+1},.3),s("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2))},.3),s("ElasticInOut",function(t){return 1>(t*=2)?-.5*this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2):.5*this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)+1},.45)),u("Expo",l("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),l("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),l("ExpoInOut",function(t){return 1>(t*=2)?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",l("SineOut",function(t){return Math.sin(t*o)}),l("SineIn",function(t){return-Math.cos(t*o)+1}),l("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(r.SlowMo,"SlowMo","ease,"),_(i,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),f},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(); | ||||
							
								
								
									
										12
									
								
								web/js/TweenLite.min.js
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								web/js/TweenLite.min.js
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										215
									
								
								web/js/cal.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										215
									
								
								web/js/cal.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,215 @@ | ||||
| var eventList = [] | ||||
| var cancelledEvents = {} | ||||
|  | ||||
| function Event (start, event) { | ||||
|     if (!(start instanceof Date)) { | ||||
|         start = start.toJSDate() | ||||
|     } | ||||
|     this.start = start | ||||
|     this.event = event | ||||
|     this.end = new Date(this.start.getTime() + this.event.duration.toSeconds()*1000) | ||||
|     this.summary = event.summary || 'No title' | ||||
|     this.description = event.description | ||||
|     this.location = event.location || false | ||||
|  | ||||
|     this.lasts_several_days = this.start.toDateString() !== this.end.toDateString() | ||||
| } | ||||
|  | ||||
| Event.prototype.isCancelled = function () { | ||||
|     if (cancelledEvents[this.event.uid] instanceof Array | ||||
|         && cancelledEvents[this.event.uid].includes(this.start.getTime())) return true | ||||
|     return false | ||||
| } | ||||
|  | ||||
| Event.prototype.toHTML = function () { | ||||
|     var br = document.createElement('br') | ||||
|  | ||||
|     var div_cal = document.createElement('div') | ||||
|     div_cal.setAttribute('class', 'cal_entry') | ||||
|  | ||||
|     var div_datetime = document.createElement('div') | ||||
|     div_datetime.setAttribute('class', 'cal_datetime') | ||||
|  | ||||
|     var span_date = document.createElement('span') | ||||
|     span_date.setAttribute('class', 'cal_date') | ||||
|     span_date.appendChild(document.createTextNode(this.start.toLocaleDateString([], {year: 'numeric', month: '2-digit', day: '2-digit'}))) | ||||
|     div_datetime.appendChild(span_date) | ||||
|  | ||||
|     if (this.lasts_several_days) { | ||||
|         var span_end_date = document.createElement('span') | ||||
|         span_end_date.setAttribute('class', 'cal_date') | ||||
|         span_end_date.appendChild(document.createTextNode(' - ' + this.end.toLocaleString([], {year: 'numeric', month: '2-digit', day: '2-digit'}))) | ||||
|         div_datetime.appendChild(span_end_date) | ||||
|     } else { | ||||
|         var span_day = document.createElement('span') | ||||
|         span_day.setAttribute('class', 'cal_day') | ||||
|         span_day.appendChild((document.createTextNode(this.start.toLocaleDateString([], {weekday: 'long'})))) | ||||
|         div_datetime.appendChild(span_day) | ||||
|     } | ||||
|  | ||||
|     var span_time = document.createElement('span') | ||||
|     span_time.setAttribute('class', 'cal_time') | ||||
|     span_time.appendChild(document.createTextNode(this.start.toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'}))) | ||||
|     div_datetime.appendChild(span_time) | ||||
|  | ||||
|     var span_summary = document.createElement('span') | ||||
|     span_summary.setAttribute('class', 'cal_summary') | ||||
|     span_summary.appendChild(document.createTextNode(this.summary)) | ||||
|  | ||||
|     var div_description = document.createElement('div') | ||||
|     div_description.setAttribute('class', 'cal_descriptionbox') | ||||
|     div_description.appendChild(span_summary) | ||||
|  | ||||
|     if (this.location !== false && !/w(ilhelminenstra(ss|ß)e )17/i.test(this.location)) { | ||||
|         var span_location = document.createElement('span') | ||||
|         span_location.setAttribute('class', 'cal_location') | ||||
|  | ||||
|         var span_location_icon = document.createElement('i') | ||||
|         span_location_icon.setAttribute('class', 'fa fa-map-marker') | ||||
|         span_location_icon.setAttribute('aria-hidden', 'true') | ||||
|  | ||||
|         span_location.appendChild(span_location_icon) | ||||
|  | ||||
|         if (this.location.match(/tb(a|d)/i)) { | ||||
|             span_location.appendChild(document.createTextNode(this.location)) | ||||
|         } else { | ||||
|             var a_location_osm = document.createElement('a') | ||||
|             a_location_osm.setAttribute('href', 'https://www.openstreetmap.org/search?query=' + encodeURI(this.location)) | ||||
|             a_location_osm.appendChild(document.createTextNode(this.location)) | ||||
|             span_location.appendChild(a_location_osm) | ||||
|         } | ||||
|  | ||||
|         div_description.appendChild(span_location) | ||||
|     } | ||||
|  | ||||
|     div_cal.appendChild(div_datetime) | ||||
|     div_cal.appendChild(div_description) | ||||
|  | ||||
|     if (this.description !== null) { | ||||
|         var parts = this.description.split(/\r\n|\r|\n/) | ||||
|  | ||||
|         parts.map(function (i) { | ||||
|             var span_description = document.createElement('span') | ||||
|             span_description.setAttribute('class', 'cal_description') | ||||
|  | ||||
|             words = i.split(' ') | ||||
|  | ||||
|             words.forEach(function(word) { | ||||
|                 if (word.match(/(ht|f)tps?\:\/\//i)) { | ||||
|                     var a = document.createElement('a') | ||||
|                     a.setAttribute('href', word) | ||||
|                     a.appendChild(document.createTextNode(word)) | ||||
|                     span_description.appendChild(a) | ||||
|                 } else { | ||||
|                     span_description.appendChild(document.createTextNode(word)) | ||||
|                 } | ||||
|                 span_description.appendChild(document.createTextNode(' ')) | ||||
|             }) | ||||
|  | ||||
|             div_description.appendChild(span_description) | ||||
|         }) | ||||
|     } | ||||
|  | ||||
|     if (this.isCancelled()) { | ||||
|         div_cal.style.textDecoration = 'line-through' | ||||
|     } | ||||
|  | ||||
|     return div_cal | ||||
| } | ||||
|  | ||||
| function parseIcalData(data) { | ||||
|     var timeRangeStart = new Date() | ||||
|     var timeRangeStop = new Date() | ||||
|     timeRangeStart.setHours(0, 0, 0) | ||||
|     timeRangeStop.setMonth(timeRangeStop.getMonth() + 1) | ||||
|  | ||||
|     var jcalData = ICAL.parse(data) | ||||
|     var vcalendar = new ICAL.Component(jcalData) | ||||
|     var events = vcalendar.getAllSubcomponents('vevent') | ||||
|  | ||||
|     events.map(function (e) { | ||||
|         var event = new ICAL.Event(e) | ||||
|  | ||||
|         if (event.isRecurring()) { | ||||
|             var expand = event.iterator() | ||||
|             var next | ||||
|             var exList = [] | ||||
|             event.component.getAllProperties('exdate').map(function (ex) { | ||||
|                 exList.push(ex.getFirstValue().toJSDate().getTime()) | ||||
|             }) | ||||
|  | ||||
|             while ((next = expand.next()) && next.toJSDate() < timeRangeStop) { | ||||
|                 if (!exList.includes(next.toJSDate().getTime()) | ||||
|                     && timeRangeStart < next.toJSDate() && next.toJSDate() < timeRangeStop) { | ||||
|                     eventList.push(new Event(next, event)) | ||||
|                 } | ||||
|             } | ||||
|         } else if (eventInTimeRange(event, timeRangeStart, timeRangeStop)) { | ||||
|             if (event.component.getFirstPropertyValue("status") == "CANCELLED") { | ||||
|                 console.log(event) | ||||
|                 if (!(cancelledEvents[event.uid] instanceof Array)) { | ||||
|                     cancelledEvents[event.uid] = [] | ||||
|                 } | ||||
|  | ||||
|                 cancelledEvents[event.uid].push(event.startDate.toJSDate().getTime()) | ||||
|             } else { | ||||
|                 eventList.push(new Event(event.startDate, event)) | ||||
|             } | ||||
|         } | ||||
|     }) | ||||
| } | ||||
|  | ||||
| function eventInTimeRange(event, start, stop) { | ||||
|     if (start < event.startDate.toJSDate() && event.startDate.toJSDate() < stop | ||||
|         || start < event.endDate.toJSDate() && event.endDate.toJSDate() < stop | ||||
|         || event.startDate.toJSDate() < start && stop < event.endDate.toJSDate()) return true | ||||
|     return false | ||||
| } | ||||
|  | ||||
| function orderEvents() { | ||||
|     eventList.sort(function (e1, e2) { | ||||
|         return e1.start - e2.start | ||||
|     }) | ||||
| } | ||||
|  | ||||
| function writeEvents() { | ||||
|     var cal = document.getElementById('calendar') | ||||
|     cal.textContent = '' | ||||
|  | ||||
|     if (eventList.length > 0) { | ||||
|         eventList.map(function (e) { | ||||
|             cal.appendChild(e.toHTML()) | ||||
|         }) | ||||
|     } else { | ||||
|         cal.textContent = 'No events found.' | ||||
|     } | ||||
| } | ||||
|  | ||||
| function xhrRequest(url, callback, fail) { | ||||
|     var xhr = new XMLHttpRequest() | ||||
|  | ||||
|     xhr.onreadystatechange = function () { | ||||
|         if (xhr.readyState === XMLHttpRequest.DONE) { | ||||
|             if (xhr.status === 200) { | ||||
|                 callback(xhr.responseText) | ||||
|             } else { | ||||
|                 fail(xhr.status) | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     xhr.open('GET', url) | ||||
|     xhr.send() | ||||
| } | ||||
|  | ||||
| function processData(data) { | ||||
|     parseIcalData(data) | ||||
|     orderEvents() | ||||
|     writeEvents() | ||||
| } | ||||
|  | ||||
| function requestFailed(status) { | ||||
|     document.getElementById('calendar').textContent = 'Something has gone wrong. Try reloading the page.' | ||||
| } | ||||
|  | ||||
| xhrRequest('https://cloud.chaospott.de/remote.php/dav/public-calendars/5HM7B0ZOLEYC3QD0?export', processData, requestFailed) | ||||
							
								
								
									
										5
									
								
								web/js/d3.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								web/js/d3.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										223
									
								
								web/js/elevator.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										223
									
								
								web/js/elevator.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,223 @@ | ||||
| /*! | ||||
|  * Elevator.js | ||||
|  * | ||||
|  * MIT licensed | ||||
|  * Copyright (C) 2015 Tim Holman, http://tholman.com | ||||
|  */ | ||||
|  | ||||
| /********************************************* | ||||
|  * Elevator.js | ||||
|  *********************************************/ | ||||
|  | ||||
| var Elevator = function(options) { | ||||
|  | ||||
|     'use strict'; | ||||
|  | ||||
|     // Elements | ||||
|     var body = null; | ||||
|  | ||||
|     // Scroll vars | ||||
|     var animation = null; | ||||
|     var duration = null; // ms | ||||
|     var customDuration = false; | ||||
|     var startTime = null; | ||||
|     var startPosition = null; | ||||
|     var endPosition = 0; | ||||
|     var elevating = false; | ||||
|  | ||||
|     var mainAudio; | ||||
|     var endAudio; | ||||
|  | ||||
|     var that = this; | ||||
|      | ||||
|     /** | ||||
|      * Utils | ||||
|      */ | ||||
|  | ||||
|     // Thanks Mr Penner - http://robertpenner.com/easing/ | ||||
|     function easeInOutQuad( t, b, c, d ) { | ||||
|         t /= d / 2; | ||||
|         if ( t < 1 ) return c / 2 * t * t + b; | ||||
|         t--; | ||||
|         return -c / 2 * ( t * ( t -2 ) - 1 ) + b; | ||||
|     } | ||||
|  | ||||
|     function extendParameters(options, defaults){ | ||||
|         for( var option in defaults ){ | ||||
|             var t = options[option] === undefined && typeof option !== "function"; | ||||
|             if(t){ | ||||
|                 options[option] = defaults[option]; | ||||
|             } | ||||
|         } | ||||
|         return options; | ||||
|     } | ||||
|  | ||||
|     function getVerticalOffset(element) { | ||||
|         var verticalOffset = 0; | ||||
|         while( element ){ | ||||
|             verticalOffset += element.offsetTop || 0; | ||||
|             element = element.offsetParent; | ||||
|         } | ||||
|         return verticalOffset; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Main | ||||
|      */ | ||||
|  | ||||
|     // Time is passed through requestAnimationFrame, what a world! | ||||
|     function animateLoop( time ) { | ||||
|         if ( !startTime ) { | ||||
|             startTime = time; | ||||
|         } | ||||
|  | ||||
|         var timeSoFar = time - startTime; | ||||
|         var easedPosition = easeInOutQuad(timeSoFar, startPosition, endPosition - startPosition, duration); | ||||
|  | ||||
|         window.scrollTo(0, easedPosition); | ||||
|  | ||||
|         if( timeSoFar < duration ) { | ||||
|             animation = requestAnimationFrame(animateLoop); | ||||
|         } else { | ||||
|             animationFinished(); | ||||
|         } | ||||
|      } | ||||
|  | ||||
| //            ELEVATE! | ||||
| //              / | ||||
| //         ____ | ||||
| //       .'    '=====<0 | ||||
| //       |======| | ||||
| //       |======| | ||||
| //       [IIIIII[\--() | ||||
| //       |_______| | ||||
| //       C O O O D | ||||
| //      C O  O  O D | ||||
| //     C  O  O  O  D | ||||
| //     C__O__O__O__D | ||||
| //    [_____________] | ||||
|     this.elevate = function() { | ||||
|  | ||||
|         if( elevating ) { | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         elevating = true; | ||||
|         startPosition = (document.documentElement.scrollTop || body.scrollTop); | ||||
|  | ||||
|         // No custom duration set, so we travel at pixels per millisecond. (0.75px per ms) | ||||
|         if( !customDuration ) { | ||||
|             duration = (startPosition * 1.5); | ||||
|         } | ||||
|  | ||||
|         requestAnimationFrame( animateLoop ); | ||||
|  | ||||
|         // Start music! | ||||
|         if( mainAudio ) { | ||||
|             mainAudio.play(); | ||||
|         } | ||||
|     }; | ||||
|  | ||||
|     function browserMeetsRequirements() { | ||||
|         return window.requestAnimationFrame && window.Audio && window.addEventListener; | ||||
|     } | ||||
|  | ||||
|     function resetPositions() { | ||||
|         startTime = null; | ||||
|         startPosition = null; | ||||
|         elevating = false; | ||||
|     } | ||||
|  | ||||
|     function animationFinished() { | ||||
|  | ||||
|         resetPositions(); | ||||
|  | ||||
|         // Stop music! | ||||
|         if( mainAudio ) { | ||||
|             mainAudio.pause(); | ||||
|             mainAudio.currentTime = 0; | ||||
|         } | ||||
|  | ||||
|         if( endAudio ) { | ||||
|             endAudio.play(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     function onWindowBlur() { | ||||
|  | ||||
|         // If animating, go straight to the top. And play no more music. | ||||
|         if( elevating ) { | ||||
|  | ||||
|             cancelAnimationFrame( animation ); | ||||
|             resetPositions(); | ||||
|  | ||||
|             if( mainAudio ) { | ||||
|                 mainAudio.pause(); | ||||
|                 mainAudio.currentTime = 0; | ||||
|             } | ||||
|  | ||||
|             window.scrollTo(0, endPosition); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     function bindElevateToElement( element ) { | ||||
|         if( element.addEventListener ) { | ||||
|             element.addEventListener('click', that.elevate, false); | ||||
|         } else { | ||||
|             // Older browsers | ||||
|             element.attachEvent('onclick', function() { | ||||
|                 document.documentElement.scrollTop = endPosition; | ||||
|                 document.body.scrollTop = endPosition; | ||||
|                 window.scroll(0, endPosition); | ||||
|             }); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     function init( _options ) { | ||||
|         // Bind to element click event, if need be. | ||||
|         body = document.body; | ||||
|  | ||||
|         var defaults = { | ||||
|             duration: undefined, | ||||
|             mainAudio: false, | ||||
|             endAudio: false, | ||||
|             preloadAudio: true, | ||||
|             loopAudio: true, | ||||
|         }; | ||||
|  | ||||
|         _options = extendParameters(_options, defaults); | ||||
|  | ||||
|         if( _options.element ) { | ||||
|             bindElevateToElement( _options.element ); | ||||
|         } | ||||
|  | ||||
|         // Take the stairs instead | ||||
|         if( !browserMeetsRequirements() ) { | ||||
|             return; | ||||
|         } | ||||
|  | ||||
|         if( _options.duration ) { | ||||
|             customDuration = true; | ||||
|             duration = _options.duration; | ||||
|         } | ||||
|  | ||||
|         if( _options.targetElement ) { | ||||
|             endPosition = getVerticalOffset(_options.targetElement); | ||||
|         } | ||||
|  | ||||
|         window.addEventListener('blur', onWindowBlur, false); | ||||
|  | ||||
|         if( _options.mainAudio ) { | ||||
|             mainAudio = new Audio( _options.mainAudio ); | ||||
|             mainAudio.setAttribute( 'preload', _options.preloadAudio ); | ||||
|             mainAudio.setAttribute( 'loop', _options.loopAudio ); | ||||
|         } | ||||
|  | ||||
|         if( _options.endAudio ) { | ||||
|             endAudio = new Audio( _options.endAudio ); | ||||
|             endAudio.setAttribute( 'preload', 'true' ); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     init(options); | ||||
| }; | ||||
							
								
								
									
										1
									
								
								web/js/elevator.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								web/js/elevator.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| var Elevator=function(){"use strict";function n(n,e){for(var t in e)t in n||(n[t]=e[t]);return n}function e(n,e,t,u){return n/=u/2,1>n?t/2*n*n+e:(n--,-t/2*(n*(n-2)-1)+e)}function t(n){p||(p=n);var u=n-p,o=e(u,v,-v,A);window.scrollTo(0,o),A>u?s=requestAnimationFrame(t):i()}function u(){w||(w=!0,v=document.documentElement.scrollTop||m.scrollTop,f||(A=1.5*v),requestAnimationFrame(t),c&&c.play())}function o(){p=null,v=null,w=!1}function i(){o(),c&&(c.pause(),c.currentTime=0),d&&d.play()}function r(){w&&(cancelAnimationFrame(s),o(),c&&(c.pause(),c.currentTime=0),window.scrollTo(0,0))}function l(n){n.addEventListener("click",u,!1)}function a(n){m=document.body,n.element&&l(n.element),n.duration&&(f=!0,A=n.duration),n.mainAudio&&(c=new Audio(n.mainAudio),c.setAttribute("preload","true"),c.setAttribute("loop","true")),n.endAudio&&(d=new Audio(n.endAudio),d.setAttribute("preload","true")),window.addEventListener("blur",r,!1)}var c,d,m=null,s=null,A=null,f=!1,p=null,v=null,w=!1;return n(a,{elevate:u})}(); | ||||
							
								
								
									
										191
									
								
								web/js/eyecandy.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										191
									
								
								web/js/eyecandy.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,191 @@ | ||||
| (function() { | ||||
|  | ||||
|     var width, height, largeHeader, canvas, ctx, points, target, animateHeader = true; | ||||
|  | ||||
|     // Main | ||||
|     initHeader(); | ||||
|     initAnimation(); | ||||
|     addListeners(); | ||||
|      | ||||
|     function initHeader() { | ||||
|         width = window.innerWidth; | ||||
|         height = 300; | ||||
|         target = {x: width/2, y: height/2}; | ||||
|  | ||||
|         largeHeader = document.getElementById('large-header'); | ||||
|         largeHeader.style.height = height+'px'; | ||||
|  | ||||
|         canvas = document.getElementById('demo-canvas'); | ||||
|         canvas.width = width; | ||||
|         canvas.height = height; | ||||
|         ctx = canvas.getContext('2d'); | ||||
|  | ||||
|         // create points | ||||
|         points = []; | ||||
|         for(var x = 0; x < width; x = x + width/20) { | ||||
|             for(var y = 0; y < height; y = y + height/20) { | ||||
|                 var px = x + Math.random()*width/20; | ||||
|                 var py = y + Math.random()*height/20; | ||||
|                 var p = {x: px, originX: px, y: py, originY: py }; | ||||
|                 points.push(p); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         // for each point find the 5 closest points | ||||
|         for(var i = 0; i < points.length; i++) { | ||||
|             var closest = []; | ||||
|             var p1 = points[i]; | ||||
|             for(var j = 0; j < points.length; j++) { | ||||
|                 var p2 = points[j] | ||||
|                 if(!(p1 == p2)) { | ||||
|                     var placed = false; | ||||
|                     for(var k = 0; k < 5; k++) { | ||||
|                         if(!placed) { | ||||
|                             if(closest[k] == undefined) { | ||||
|                                 closest[k] = p2; | ||||
|                                 placed = true; | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|  | ||||
|                     for(var k = 0; k < 5; k++) { | ||||
|                         if(!placed) { | ||||
|                             if(getDistance(p1, p2) < getDistance(p1, closest[k])) { | ||||
|                                 closest[k] = p2; | ||||
|                                 placed = true; | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             p1.closest = closest; | ||||
|         } | ||||
|  | ||||
|         // assign a circle to each point | ||||
|         for(var i in points) { | ||||
|             var c = new Circle(points[i], 2+Math.random()*2, 'rgba(255,255,255,0.3)'); | ||||
|             points[i].circle = c; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // Event handling | ||||
|     function addListeners() { | ||||
|         if(!('ontouchstart' in window)) { | ||||
|             window.addEventListener('mousemove', mouseMove); | ||||
|         } | ||||
|         window.addEventListener('scroll', scrollCheck); | ||||
|         window.addEventListener('resize', resize); | ||||
|     } | ||||
|  | ||||
|     function mouseMove(e) { | ||||
|         var posx = posy = 0; | ||||
|         if (e.pageX || e.pageY) { | ||||
|             posx = e.pageX; | ||||
|             posy = e.pageY; | ||||
|         } | ||||
|         else if (e.clientX || e.clientY)    { | ||||
|             posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; | ||||
|             posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; | ||||
|         } | ||||
|         target.x = posx; | ||||
|         target.y = posy; | ||||
|     } | ||||
|  | ||||
|     function scrollCheck() { | ||||
|         if(document.body.scrollTop > height) animateHeader = false; | ||||
|         else animateHeader = true; | ||||
|     } | ||||
|  | ||||
|     function resize() { | ||||
|         var element = document.getElementById('demo-canvas'); | ||||
|         if(element.style.display == 'none') { | ||||
|             animateHeader = false; | ||||
|         } else { | ||||
|             animateHeader = true; | ||||
|         } | ||||
|  | ||||
|         width = window.innerWidth; | ||||
|         height = 300; | ||||
|         largeHeader.style.height = height+'px'; | ||||
|         canvas.width = width; | ||||
|         canvas.height = height; | ||||
|     } | ||||
|  | ||||
|     // animation | ||||
|     function initAnimation() { | ||||
|         animate(); | ||||
|         for(var i in points) { | ||||
|             shiftPoint(points[i]); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     function animate() { | ||||
|         if(animateHeader) { | ||||
|             ctx.clearRect(0,0,width,height); | ||||
|             for(var i in points) { | ||||
|                 // detect points in range | ||||
|                 if(Math.abs(getDistance(target, points[i])) < 4000) { | ||||
|                     points[i].active = 0.3; | ||||
|                     points[i].circle.active = 0.6; | ||||
|                 } else if(Math.abs(getDistance(target, points[i])) < 20000) { | ||||
|                     points[i].active = 0.1; | ||||
|                     points[i].circle.active = 0.3; | ||||
|                 } else if(Math.abs(getDistance(target, points[i])) < 40000) { | ||||
|                     points[i].active = 0.02; | ||||
|                     points[i].circle.active = 0.1; | ||||
|                 } else { | ||||
|                     points[i].active = 0; | ||||
|                     points[i].circle.active = 0; | ||||
|                 } | ||||
|  | ||||
|                 drawLines(points[i]); | ||||
|                 points[i].circle.draw(); | ||||
|             } | ||||
|         } | ||||
|         requestAnimationFrame(animate); | ||||
|     } | ||||
|  | ||||
|     function shiftPoint(p) { | ||||
|         TweenLite.to(p, 1+1*Math.random(), {x:p.originX-50+Math.random()*100, | ||||
|             y: p.originY-50+Math.random()*100, ease:Circ.easeInOut, | ||||
|             onComplete: function() { | ||||
|                 shiftPoint(p); | ||||
|             }}); | ||||
|     } | ||||
|  | ||||
|     // Canvas manipulation | ||||
|     function drawLines(p) { | ||||
|         if(!p.active) return; | ||||
|         for(var i in p.closest) { | ||||
|             ctx.beginPath(); | ||||
|             ctx.moveTo(p.x, p.y); | ||||
|             ctx.lineTo(p.closest[i].x, p.closest[i].y); | ||||
|             ctx.strokeStyle = 'rgba(210,212,188,'+ p.active+')'; | ||||
|             ctx.stroke(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     function Circle(pos,rad,color) { | ||||
|         var _this = this; | ||||
|  | ||||
|         // constructor | ||||
|         (function() { | ||||
|             _this.pos = pos || null; | ||||
|             _this.radius = rad || null; | ||||
|             _this.color = color || null; | ||||
|         })(); | ||||
|  | ||||
|         this.draw = function() { | ||||
|             if(!_this.active) return; | ||||
|             ctx.beginPath(); | ||||
|             ctx.arc(_this.pos.x, _this.pos.y, _this.radius, 0, 2 * Math.PI, false); | ||||
|             ctx.fillStyle = 'rgba(210,212,188,'+ _this.active+')'; | ||||
|             ctx.fill(); | ||||
|         }; | ||||
|     } | ||||
|  | ||||
|     // Util | ||||
|     function getDistance(p1, p2) { | ||||
|         return Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2); | ||||
|     } | ||||
| })(); | ||||
							
								
								
									
										4
									
								
								web/js/ical.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								web/js/ical.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3043
									
								
								web/js/moment.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3043
									
								
								web/js/moment.js
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										31
									
								
								web/js/rAF.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								web/js/rAF.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | ||||
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | ||||
|  | ||||
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | ||||
|  | ||||
| // MIT license | ||||
|  | ||||
| (function() { | ||||
|     var lastTime = 0; | ||||
|     var vendors = ['ms', 'moz', 'webkit', 'o']; | ||||
|     for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | ||||
|         window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | ||||
|         window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] | ||||
|             || window[vendors[x]+'CancelRequestAnimationFrame']; | ||||
|     } | ||||
|  | ||||
|     if (!window.requestAnimationFrame) | ||||
|         window.requestAnimationFrame = function(callback, element) { | ||||
|             var currTime = new Date().getTime(); | ||||
|             var timeToCall = Math.max(0, 16 - (currTime - lastTime)); | ||||
|             var id = window.setTimeout(function() { callback(currTime + timeToCall); }, | ||||
|                 timeToCall); | ||||
|             lastTime = currTime + timeToCall; | ||||
|             return id; | ||||
|         }; | ||||
|  | ||||
|     if (!window.cancelAnimationFrame) | ||||
|         window.cancelAnimationFrame = function(id) { | ||||
|             clearTimeout(id); | ||||
|         }; | ||||
| }()); | ||||
		Reference in New Issue
	
	Block a user
	 CryptKiddie
					CryptKiddie