aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab2011-12-26 00:00:38 -0800
committerHakim El Hattab2011-12-26 00:00:38 -0800
commitc7c7735e7ac34b26295b30d3aef51947f939692c (patch)
tree59cfca7ecca45e05222e0f93d968d3ec91955cca /js
parent1ac6386eef529bf717a726ea06cd0848b9a68bde (diff)
added new transitions (box/page) and a ui theme (neon)
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index d751a03..2e06010 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -62,6 +62,9 @@
* version 1.1:
* - Optional progress bar UI element
* - Slide overview available via SPACE
+ * - Added 'transition' option for specifying transition styles
+ * - Added 'theme' option for specifying UI styles
+ * - Slides that contain nested-slides are given the 'stack' class
*
* TODO:
* - Touch/swipe interactions
@@ -83,6 +86,7 @@ var Reveal = (function(){
// > {Boolean} controls
// > {Boolean} progress
// > {String} theme
+ // > {String} transition
// > {Boolean} rollingLinks
config = {},
@@ -122,11 +126,12 @@ var Reveal = (function(){
config.rollingLinks = options.rollingLinks === undefined ? true : options.rollingLinks;
config.controls = options.controls === undefined ? false : options.controls;
config.progress = options.progress === undefined ? false : options.progress;
+ config.transition = options.transition === undefined ? 'default' : options.transition;
config.theme = options.theme === undefined ? 'default' : options.theme;
// Fall back on the 2D transform theme 'linear'
if( supports3DTransforms === false ) {
- config.theme = 'linear';
+ config.transition = 'linear';
}
if( config.controls ) {
@@ -137,6 +142,10 @@ var Reveal = (function(){
dom.progress.style.display = 'block';
}
+ if( config.transition !== 'default' ) {
+ document.body.classList.add( config.transition );
+ }
+
if( config.theme !== 'default' ) {
document.body.classList.add( config.theme );
}
@@ -417,6 +426,11 @@ var Reveal = (function(){
// Any element subsequent to index is given the 'future' class
slide.setAttribute('class', 'future');
}
+
+ // If this element contains vertical slides
+ if( slide.querySelector( 'section' ) ) {
+ slide.classList.add( 'stack' );
+ }
}
}
else {