add theme config option, add sky theme, fix line-height of <small>

This commit is contained in:
Hakim El Hattab
2012-08-30 00:59:51 -04:00
parent e3f3e9defb
commit 90f343e5bd
5 changed files with 209 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
/*!
* reveal.js 2.0 r20
* reveal.js 2.0 r21
* http://lab.hakim.se/reveal-js
* MIT licensed
*
@@ -39,6 +39,9 @@ var Reveal = (function(){
// Apply a 3D roll to links on hover
rollingLinks: true,
// Transition style (see /css/theme)
theme: 'default',
// Transition style
transition: 'default', // default/cube/page/concave/linear(2d),
@@ -111,6 +114,7 @@ var Reveal = (function(){
extend( config, options );
// Cache references to DOM elements
dom.theme = document.querySelector( '#theme' );
dom.wrapper = document.querySelector( '.reveal' );
dom.progress = document.querySelector( '.reveal .progress' );
dom.progressbar = document.querySelector( '.reveal .progress span' );
@@ -222,6 +226,10 @@ var Reveal = (function(){
dom.progress.style.display = 'block';
}
if( config.theme && dom.theme ) {
dom.theme.setAttribute( 'href', 'css/theme/' + config.theme + '.css' );
}
if( config.transition !== 'default' ) {
dom.wrapper.classList.add( config.transition );
}