themes are now available as separate css files under css/theme/, old theme option in config is no longer supported (closes #104)

This commit is contained in:
Hakim El Hattab
2012-08-08 01:14:12 -04:00
parent 1efca069cb
commit 25ad8adc68
9 changed files with 400 additions and 274 deletions

View File

@ -1,5 +1,5 @@
/*!
* reveal.js 1.5 r15
* reveal.js 1.5 r16
* http://lab.hakim.se/reveal-js
* MIT licensed
*
@ -39,9 +39,6 @@ var Reveal = (function(){
// Apply a 3D roll to links on hover
rollingLinks: true,
// UI style
theme: 'default', // default/neon/beige
// Transition style
transition: 'default' // default/cube/page/concave/linear(2d)
},
@ -155,7 +152,6 @@ var Reveal = (function(){
function configure() {
if( supports3DTransforms === false ) {
// Fall back on the 2D transform theme 'linear'
config.transition = 'linear';
}
@ -171,10 +167,6 @@ var Reveal = (function(){
dom.wrapper.classList.add( config.transition );
}
if( config.theme !== 'default' ) {
document.documentElement.classList.add( 'theme-' + config.theme );
}
if( config.mouseWheel ) {
document.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF
document.addEventListener( 'mousewheel', onDocumentMouseScroll, false );

11
js/reveal.min.js vendored
View File

@ -1,20 +1,19 @@
/*!
* reveal.js 1.5 r15
* reveal.js 1.5 r16
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2011-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={controls:true,progress:true,history:false,keyboard:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:"default",transition:"default"},k=0,c=0,v,C,W=[],d={},M="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,l="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,y=!!document.body.classList;
var Reveal=(function(){var j=".reveal .slides>section",a=".reveal .slides>section.present>section",e=!!("ontouchstart" in window),K={controls:true,progress:true,history:false,keyboard:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,transition:"default"},k=0,c=0,v,C,W=[],d={},M="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,l="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,y=!!document.body.classList;
mouseWheelTimeout=0,autoSlideTimeout=0,writeURLTimeout=0,touch={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:40};function h(Y){if((!l&&!M)||!y){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(K.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");}A();q(K,Y);F();E();H();if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
d.controlsUp=document.querySelector(".reveal .controls .up");d.controlsDown=document.querySelector(".reveal .controls .down");}q(K,Y);A();F();E();H();if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
document.body.style.height="120%";window.addEventListener("load",S,false);window.addEventListener("orientationchange",S,false);}}function F(){if(M===false){K.transition="linear";
}if(K.controls&&d.controls){d.controls.style.display="block";}if(K.progress&&d.progress){d.progress.style.display="block";}if(K.transition!=="default"){d.wrapper.classList.add(K.transition);
}if(K.theme!=="default"){document.documentElement.classList.add("theme-"+K.theme);}if(K.mouseWheel){document.addEventListener("DOMMouseScroll",m,false);
document.addEventListener("mousewheel",m,false);}if(K.rollingLinks){G();}}function A(){document.addEventListener("touchstart",w,false);document.addEventListener("touchmove",U,false);
document.addEventListener("touchend",O,false);window.addEventListener("hashchange",t,false);if(K.keyboard){document.addEventListener("keydown",V,false);
}if(K.mouseWheel){document.addEventListener("DOMMouseScroll",m,false);document.addEventListener("mousewheel",m,false);}if(K.rollingLinks){G();}}function A(){document.addEventListener("touchstart",w,false);
document.addEventListener("touchmove",U,false);document.addEventListener("touchend",O,false);window.addEventListener("hashchange",t,false);if(K.keyboard){document.addEventListener("keydown",V,false);
}if(K.controls&&d.controls){d.controlsLeft.addEventListener("click",n(x),false);d.controlsRight.addEventListener("click",n(i),false);d.controlsUp.addEventListener("click",n(r),false);
d.controlsDown.addEventListener("click",n(B),false);}}function N(){document.removeEventListener("keydown",V,false);document.removeEventListener("touchstart",w,false);
document.removeEventListener("touchmove",U,false);document.removeEventListener("touchend",O,false);window.removeEventListener("hashchange",t,false);if(K.controls&&d.controls){d.controlsLeft.removeEventListener("click",n(x),false);