/lib restructuring
authorHakim El Hattab <hakim.elhattab@gmail.com>
Sun, 1 Jul 2012 20:38:49 +0000 (16:38 -0400)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Sun, 1 Jul 2012 20:38:49 +0000 (16:38 -0400)
12 files changed:
README.md
css/main.css
index.html
js/reveal.min.js [deleted file]
js/reveal.slidenotes.js [moved from js/slidenotes.js with 100% similarity]
lib/highlight/highlight.js [moved from lib/js/highlight.js with 100% similarity]
lib/highlight/zenburn.css [moved from lib/css/zenburn.css with 100% similarity]
lib/leaguegothic/LICENSE [moved from lib/fonts/leaguegothic/LICENSE with 100% similarity]
lib/leaguegothic/league_gothic-webfont.ttf [moved from lib/fonts/leaguegothic/league_gothic-webfont.ttf with 100% similarity]
lib/polyfills/classList.js [moved from lib/js/classList.js with 100% similarity]
lib/slidenotes/index.js [moved from slidenotes/index.js with 97% similarity]
lib/slidenotes/notes.html [moved from slidenotes/notes.html with 100% similarity]

index 74b922eeed9aafef6c373038dad7505ec92c51d8..e55c339d39bd9ffb5ea7259811a22127a242c012 100644 (file)
--- a/README.md
+++ b/README.md
@@ -161,6 +161,7 @@ You can change the appearance of the speaker notes by editing the file at `slide
 - API methods for adding or removing all event listeners
 - The 'slidechange' event now includes currentSlide and previousSlide
 - Fixed bug where 'slidechange' was firing twice when history was enabled
+- Changed /lib structure
 
 #### 1.3
 - Revised keyboard shortcuts, including ESC for overview, N for next, P for previous. Thanks [mahemoff](https://github.com/mahemoff)
index 57972562284440d2c545e6958baa39069dbe7fdd..16fae2426a614f6035b323d65dca8f72d9e4767e 100644 (file)
@@ -11,7 +11,7 @@
 
 @font-face {
        font-family: 'League Gothic';
-       src: url('../lib/fonts/leaguegothic/league_gothic-webfont.ttf') format('truetype');
+       src: url('../lib/leaguegothic/league_gothic-webfont.ttf') format('truetype');
        font-weight: normal;
        font-style: normal;
 }
index d65c1cac4c12759872deb38c164e4b471d987753..a3378f11a6e37fc0e64b20b5e508f4f19d6359b5 100644 (file)
@@ -18,7 +18,7 @@
                <link rel="stylesheet" href="css/main.css">
                <link rel="stylesheet" href="css/print.css" type="text/css" media="print">
 
-               <link rel="stylesheet" href="lib/css/zenburn.css">
+               <link rel="stylesheet" href="lib/highlight/zenburn.css">
        </head>
        
        <body>
@@ -264,8 +264,8 @@ linkify( 'a' );
                </div>
 
                <!-- Optional libraries for code syntax highlighting and classList support in IE9 -->
-               <script src="lib/js/highlight.js"></script>
-               <script src="lib/js/classList.js"></script>
+               <script src="lib/highlight/highlight.js"></script>
+               <script src="lib/polyfills/classList.js"></script>
                
                <script src="js/reveal.js"></script>
                
@@ -317,7 +317,7 @@ linkify( 'a' );
                </script>
 
                <!-- the next two lines enable the speaker notes server -->
-               <script src="socket.io/socket.io.js"></script>
-               <script src="js/slidenotes.js"></script>
+               <!-- <script src="socket.io/socket.io.js"></script>
+               <script src="js/reveal.slidenotes.js"></script> -->
        </body>
 </html>
\ No newline at end of file
diff --git a/js/reveal.min.js b/js/reveal.min.js
deleted file mode 100644 (file)
index 7a68ab0..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*!
- * reveal.js 1.4
- * http://lab.hakim.se/reveal-js
- * MIT licensed
- * 
- * Copyright (C) 2012 Hakim El Hattab, http://hakim.se
- */
-var Reveal=(function(){var j=".reveal .slides>section",a=".reveal .slides>section.present>section",e=!!("ontouchstart" in window),k=0,c=0,H={controls:true,progress:false,history:false,loop:false,mouseWheel:true,rollingLinks:true,transition:"default",theme:"default"},T=[],d={},J=document.body.style.WebkitPerspective!==undefined||document.body.style.MozPerspective!==undefined||document.body.style.msPerspective!==undefined||document.body.style.OPerspective!==undefined||document.body.style.perspective!==undefined,l=document.body.style.WebkitTransform!==undefined||document.body.style.MozTransform!==undefined||document.body.style.msTransform!==undefined||document.body.style.OTransform!==undefined||document.body.style.transform!==undefined,x=!!document.body.classList;
-mouseWheelTimeout=0,writeURLTimeout=0,touch={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:40};function h(V){if((!l&&!J)||!x){document.body.setAttribute("class","no-transforms");
-return;}d.wrapper=document.querySelector(".reveal");d.progress=document.querySelector(".reveal .progress");d.progressbar=document.querySelector(".reveal .progress span");
-if(H.controls){d.controls=document.querySelector(".reveal .controls");d.controlsLeft=document.querySelector(".reveal .controls .left");d.controlsRight=document.querySelector(".reveal .controls .right");
-d.controlsUp=document.querySelector(".reveal .controls .up");d.controlsDown=document.querySelector(".reveal .controls .down");}z();q(H,V);C();D();if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
-document.body.style.height="120%";window.addEventListener("load",P,false);window.addEventListener("orientationchange",P,false);}}function C(){if(J===false){H.transition="linear";
-}if(H.controls&&d.controls){d.controls.style.display="block";}if(H.progress){d.progress.style.display="block";}if(H.transition!=="default"){d.wrapper.classList.add(H.transition);
-}if(H.theme!=="default"){d.wrapper.classList.add(H.theme);}if(H.mouseWheel){document.addEventListener("DOMMouseScroll",m,false);document.addEventListener("mousewheel",m,false);
-}if(H.rollingLinks){E();}}function z(){document.addEventListener("keydown",S,false);document.addEventListener("touchstart",v,false);document.addEventListener("touchmove",R,false);
-document.addEventListener("touchend",L,false);window.addEventListener("hashchange",t,false);if(H.controls&&d.controls){d.controlsLeft.addEventListener("click",n(w),false);
-d.controlsRight.addEventListener("click",n(i),false);d.controlsUp.addEventListener("click",n(r),false);d.controlsDown.addEventListener("click",n(A),false);
-}}function K(){document.removeEventListener("keydown",S,false);document.removeEventListener("touchstart",v,false);document.removeEventListener("touchmove",R,false);
-document.removeEventListener("touchend",L,false);window.removeEventListener("hashchange",t,false);if(H.controls&&d.controls){d.controlsLeft.removeEventListener("click",n(w),false);
-d.controlsRight.removeEventListener("click",n(i),false);d.controlsUp.removeEventListener("click",n(r),false);d.controlsDown.removeEventListener("click",n(A),false);
-}}function q(W,V){for(var X in V){W[X]=V[X];}}function I(X,V){var Y=X.x-V.x,W=X.y-V.y;return Math.sqrt(Y*Y+W*W);}function n(V){return function(W){W.preventDefault();
-V.call();};}function P(){setTimeout(function(){window.scrollTo(0,1);},0);}function S(W){if(W.target.contentEditable!="inherit"||W.shiftKey||W.altKey||W.ctrlKey||W.metaKey){return;
-}var V=false;switch(W.keyCode){case 80:case 33:N();V=true;break;case 78:case 34:u();V=true;break;case 72:case 37:w();V=true;break;case 76:case 39:i();V=true;
-break;case 75:case 38:r();V=true;break;case 74:case 40:A();V=true;break;case 36:F(0);V=true;break;case 35:F(Number.MAX_VALUE);V=true;break;case 32:O()?Q():u();
-V=true;break;case 13:if(O()){Q();V=true;}break;}if(V){W.preventDefault();}else{if(W.keyCode===27&&J){if(O()){Q();}else{B();}W.preventDefault();}}}function v(V){touch.startX=V.touches[0].clientX;
-touch.startY=V.touches[0].clientY;touch.startCount=V.touches.length;if(V.touches.length===2){touch.startSpan=I({x:V.touches[1].clientX,y:V.touches[1].clientY},{x:touch.startX,y:touch.startY});
-}}function R(aa){if(!touch.handled){var Y=aa.touches[0].clientX;var X=aa.touches[0].clientY;if(aa.touches.length===2&&touch.startCount===2){var Z=I({x:aa.touches[1].clientX,y:aa.touches[1].clientY},{x:touch.startX,y:touch.startY});
-if(Math.abs(touch.startSpan-Z)>touch.threshold){touch.handled=true;if(Z<touch.startSpan){B();}else{Q();}}}else{if(aa.touches.length===1){var W=Y-touch.startX,V=X-touch.startY;
-if(W>touch.threshold&&Math.abs(W)>Math.abs(V)){touch.handled=true;w();}else{if(W<-touch.threshold&&Math.abs(W)>Math.abs(V)){touch.handled=true;i();}else{if(V>touch.threshold){touch.handled=true;
-r();}else{if(V<-touch.threshold){touch.handled=true;A();}}}}}}aa.preventDefault();}}function L(V){touch.handled=false;}function m(V){clearTimeout(mouseWheelTimeout);
-mouseWheelTimeout=setTimeout(function(){var W=V.detail||-V.wheelDelta;if(W>0){u();}else{N();}},100);}function t(V){D();}function E(){if(J){var W=document.querySelectorAll(".reveal .slides section a:not(.image)");
-for(var X=0,V=W.length;X<V;X++){var Y=W[X];if(Y.textContent&&!Y.querySelector("img")&&(!Y.className||!Y.classList.contains(Y,"roll"))){Y.classList.add("roll");
-Y.innerHTML='<span data-title="'+Y.text+'">'+Y.innerHTML+"</span>";}}}}function B(){d.wrapper.classList.add("overview");var V=Array.prototype.slice.call(document.querySelectorAll(j));
-for(var aa=0,Y=V.length;aa<Y;aa++){var X=V[aa],ae="translateZ(-2500px) translate("+((aa-k)*105)+"%, 0%)";X.setAttribute("data-index-h",aa);X.style.display="block";
-X.style.WebkitTransform=ae;X.style.MozTransform=ae;X.style.msTransform=ae;X.style.OTransform=ae;X.style.transform=ae;if(!X.classList.contains("stack")){X.addEventListener("click",y,true);
-}var ad=Array.prototype.slice.call(X.querySelectorAll("section"));for(var Z=0,W=ad.length;Z<W;Z++){var ac=ad[Z],ab="translate(0%, "+((Z-c)*105)+"%)";ac.setAttribute("data-index-h",aa);
-ac.setAttribute("data-index-v",Z);ac.style.display="block";ac.style.WebkitTransform=ab;ac.style.MozTransform=ab;ac.style.msTransform=ab;ac.style.OTransform=ab;
-ac.style.transform=ab;ac.addEventListener("click",y,true);}}}function Q(){d.wrapper.classList.remove("overview");var Y=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
-for(var X=0,V=Y.length;X<V;X++){var W=Y[X];W.style.WebkitTransform="";W.style.MozTransform="";W.style.msTransform="";W.style.OTransform="";W.style.transform="";
-W.removeEventListener("click",y);}b();}function O(){return d.wrapper.classList.contains("overview");}function y(V){if(O()){V.preventDefault();Q();k=this.getAttribute("data-index-h");
-c=this.getAttribute("data-index-v");b();}}function U(W,Y){var aa=Array.prototype.slice.call(document.querySelectorAll(W)),ab=aa.length;if(ab){if(H.loop){Y%=ab;
-if(Y<0){Y=ab+Y;}}Y=Math.max(Math.min(Y,ab-1),0);for(var Z=0;Z<ab;Z++){var V=aa[Z];if(O()===false){var ac=Math.abs((Y-Z)%(ab-3))||0;V.style.display=ac>3?"none":"block";
-}aa[Z].classList.remove("past");aa[Z].classList.remove("present");aa[Z].classList.remove("future");if(Z<Y){aa[Z].classList.add("past");}else{if(Z>Y){aa[Z].classList.add("future");
-}}if(V.querySelector("section")){aa[Z].classList.add("stack");}}aa[Y].classList.add("present");var X=aa[Y].getAttribute("data-state");if(X){T=T.concat(X.split(" "));
-}}else{Y=0;}return Y;}function b(ab,ag){var Y=T.concat();T.length=0;var af=k,W=c;k=U(j,ab===undefined?k:ab);c=U(a,ag===undefined?c:ag);stateLoop:for(var Z=0,ad=T.length;
-Z<ad;Z++){for(var X=0;X<Y.length;X++){if(Y[X]===T[Z]){Y.splice(X,1);continue stateLoop;}}document.documentElement.classList.add(T[Z]);o(T[Z]);}while(Y.length){document.documentElement.classList.remove(Y.pop());
-}if(H.progress){d.progressbar.style.width=(k/(document.querySelectorAll(j).length-1))*window.innerWidth+"px";}if(O()){B();}p();clearTimeout(writeURLTimeout);
-writeURLTimeout=setTimeout(g,1500);if(k!==af||c!==W){var V=document.querySelectorAll(j);var aa=V[af],ae=V[k];var ac=aa.querySelectorAll("section");currentVerticalSlides=ae.querySelectorAll("section");
-o("slidechanged",{indexh:k,indexv:c,previousSlide:ac[W]||aa,currentSlide:currentVerticalSlides[c]||ae});}}function p(){if(!H.controls||!d.controls){return;
-}var V=f();[d.controlsLeft,d.controlsRight,d.controlsUp,d.controlsDown].forEach(function(W){W.classList.remove("enabled");});if(V.left){d.controlsLeft.classList.add("enabled");
-}if(V.right){d.controlsRight.classList.add("enabled");}if(V.up){d.controlsUp.classList.add("enabled");}if(V.down){d.controlsDown.classList.add("enabled");
-}}function f(){var V=document.querySelectorAll(j);var W=document.querySelectorAll(a);return{left:k>0,right:k<V.length-1,up:c>0,down:c<W.length-1};}function D(){var V=window.location.hash.slice(2).split("/");
-k=parseInt(V[0])||0;c=parseInt(V[1])||0;F(k,c);}function g(){if(H.history){var V="/";if(k>0||c>0){V+=k;}if(c>0){V+="/"+c;}window.location.hash=V;}}function o(W,V){var X=document.createEvent("HTMLEvents",1,2);
-X.initEvent(W,true,true);q(X,V);d.wrapper.dispatchEvent(X);}function s(){if(document.querySelector(a+".present")){var W=document.querySelectorAll(a+".present .fragment:not(.visible)");
-if(W.length){W[0].classList.add("visible");o("fragmentshown",{fragment:W[0]});return true;}}else{var V=document.querySelectorAll(j+".present .fragment:not(.visible)");
-if(V.length){V[0].classList.add("visible");o("fragmentshown",{fragment:V[0]});return true;}}return false;}function G(){if(document.querySelector(a+".present")){var W=document.querySelectorAll(a+".present .fragment.visible");
-if(W.length){W[W.length-1].classList.remove("visible");o("fragmenthidden",{fragment:W[0]});return true;}}else{var V=document.querySelectorAll(j+".present .fragment.visible");
-if(V.length){V[V.length-1].classList.remove("visible");o("fragmenthidden",{fragment:V[0]});return true;}}return false;}function F(W,V){b(W,V);}function w(){if(O()||G()===false){b(k-1,0);
-}}function i(){if(O()||s()===false){b(k+1,0);}}function r(){if(O()||G()===false){b(k,c-1);}}function A(){if(O()||s()===false){b(k,c+1);}}function N(){if(G()===false){if(f().up){r();
-}else{var V=document.querySelector(".reveal .slides>section.past:nth-child("+k+")");if(V){c=(V.querySelectorAll("section").length+1)||0;k--;b();}}}}function u(){if(s()===false){f().down?A():i();
-}}function M(){if(O()){Q();}else{B();}}return{initialize:h,navigateTo:F,navigateLeft:w,navigateRight:i,navigateUp:r,navigateDown:A,navigatePrev:N,navigateNext:u,toggleOverview:M,addEventListeners:z,removeEventListeners:K,addEventListener:function(W,X,V){(d.wrapper||document.querySelector(".reveal")).addEventListener(W,X,V);
-},removeEventListener:function(W,X,V){(d.wrapper||document.querySelector(".reveal")).removeEventListener(W,X,V);}};})();
\ No newline at end of file
similarity index 100%
rename from js/slidenotes.js
rename to js/reveal.slidenotes.js
similarity index 97%
rename from slidenotes/index.js
rename to lib/slidenotes/index.js
index d27847e845efe203181c0f9db445e537327f45e1..26b046389d65a44424821fd68abee49bf9c0cf19 100644 (file)
@@ -11,7 +11,7 @@ io            = io.listen(app);
 
 var opts = {
   port :      1947,
-  baseDir :   __dirname + '/../'
+  baseDir :   __dirname + '/../../'
 };
 
 io.sockets.on('connection', function(socket) {