aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2012-06-02 18:33:08 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2012-06-02 18:33:08 -0400
commit6db42971eaa9f926fd68649e5daa2c883db9da28 (patch)
tree39fd8d8668faa380e14f6b04ea5da862c504c6e5 /js
parent6bcdd8e240b58aa29ffa52c7897b8273b1c268d8 (diff)
downloadperl-software-in-gnu-guix-6db42971eaa9f926fd68649e5daa2c883db9da28.tar
perl-software-in-gnu-guix-6db42971eaa9f926fd68649e5daa2c883db9da28.tar.gz
changed selection of main container from #reveal to .reveal (closes #46)
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js32
-rw-r--r--js/reveal.min.js18
2 files changed, 25 insertions, 25 deletions
diff --git a/js/reveal.js b/js/reveal.js
index afebafa..c51f87b 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -7,8 +7,8 @@
*/
var Reveal = (function(){
- var HORIZONTAL_SLIDES_SELECTOR = '#reveal .slides>section',
- VERTICAL_SLIDES_SELECTOR = '#reveal .slides>section.present>section',
+ var HORIZONTAL_SLIDES_SELECTOR = '.reveal .slides>section',
+ VERTICAL_SLIDES_SELECTOR = '.reveal .slides>section.present>section',
IS_TOUCH_DEVICE = !!( 'ontouchstart' in window ),
@@ -84,14 +84,14 @@ var Reveal = (function(){
}
// Cache references to DOM elements
- dom.wrapper = document.querySelector( '#reveal' );
- dom.progress = document.querySelector( '#reveal .progress' );
- dom.progressbar = document.querySelector( '#reveal .progress span' );
- dom.controls = document.querySelector( '#reveal .controls' );
- dom.controlsLeft = document.querySelector( '#reveal .controls .left' );
- dom.controlsRight = document.querySelector( '#reveal .controls .right' );
- dom.controlsUp = document.querySelector( '#reveal .controls .up' );
- dom.controlsDown = document.querySelector( '#reveal .controls .down' );
+ dom.wrapper = document.querySelector( '.reveal' );
+ dom.progress = document.querySelector( '.reveal .progress' );
+ dom.progressbar = document.querySelector( '.reveal .progress span' );
+ dom.controls = document.querySelector( '.reveal .controls' );
+ dom.controlsLeft = document.querySelector( '.reveal .controls .left' );
+ dom.controlsRight = document.querySelector( '.reveal .controls .right' );
+ dom.controlsUp = document.querySelector( '.reveal .controls .up' );
+ dom.controlsDown = document.querySelector( '.reveal .controls .down' );
addEventListeners();
@@ -402,7 +402,7 @@ var Reveal = (function(){
*/
function linkify() {
if( supports3DTransforms ) {
- var nodes = document.querySelectorAll( '#reveal .slides section a:not(.image)' );
+ var nodes = document.querySelectorAll( '.reveal .slides section a:not(.image)' );
for( var i = 0, len = nodes.length; i < len; i++ ) {
var node = nodes[i];
@@ -474,7 +474,7 @@ var Reveal = (function(){
function deactivateOverview() {
dom.wrapper.classList.remove( 'overview' );
- var slides = Array.prototype.slice.call( document.querySelectorAll( '#reveal .slides section' ) );
+ var slides = Array.prototype.slice.call( document.querySelectorAll( '.reveal .slides section' ) );
for( var i = 0, len = slides.length; i < len; i++ ) {
var element = slides[i];
@@ -732,7 +732,7 @@ var Reveal = (function(){
/**
* Dispatches an event of the specified type from the
- * #reveal DOM element.
+ * reveal DOM element.
*/
function dispatchEvent( type, properties ) {
var event = document.createEvent( "HTMLEvents", 1, 2 );
@@ -865,7 +865,7 @@ var Reveal = (function(){
}
else {
// Fetch the previous horizontal slide, if there is one
- var previousSlide = document.querySelector( '#reveal .slides>section.past:nth-child(' + indexh + ')' );
+ var previousSlide = document.querySelector( '.reveal .slides>section.past:nth-child(' + indexh + ')' );
if( previousSlide ) {
indexv = ( previousSlide.querySelectorAll('section').length + 1 ) || 0;
@@ -910,10 +910,10 @@ var Reveal = (function(){
// Forward event binding to the reveal DOM element
addEventListener: function( type, listener, useCapture ) {
- ( dom.wrapper || document.querySelector( '#reveal' ) ).addEventListener( type, listener, useCapture );
+ ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );
},
removeEventListener: function( type, listener, useCapture ) {
- ( dom.wrapper || document.querySelector( '#reveal' ) ).removeEventListener( type, listener, useCapture );
+ ( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture );
}
};
diff --git a/js/reveal.min.js b/js/reveal.min.js
index dcdaec7..6cf8e84 100644
--- a/js/reveal.min.js
+++ b/js/reveal.min.js
@@ -5,11 +5,11 @@
*
* 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:false,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;
+var Reveal=(function(){var j=".reveal .slides>section",a=".reveal .slides>section.present>section",e=!!("ontouchstart" in window),k=0,c=0,H={controls:false,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");
-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";
+return;}d.wrapper=document.querySelector(".reveal");d.progress=document.querySelector(".reveal .progress");d.progressbar=document.querySelector(".reveal .progress span");
+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.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);
@@ -28,14 +28,14 @@ touch.startY=V.touches[0].clientY;touch.startCount=V.touches.length;if(V.touches
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)");
+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"));
+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;
@@ -55,6 +55,6 @@ o("fragmentshown",{fragment:V[0]});return true;}}return false;}function G(){if(d
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){k=W===undefined?k:W;
c=V===undefined?c:V;b();}function w(){if(O()||G()===false){k--;c=0;b();}}function i(){if(O()||s()===false){k++;c=0;b();}}function r(){if(O()||G()===false){c--;
-b();}}function A(){if(O()||s()===false){c++;b();}}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,toggleOverview:M,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
+b();}}function A(){if(O()||s()===false){c++;b();}}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,toggleOverview:M,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