mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-14 16:35:07 +01:00
add theme config option, add sky theme, fix line-height of <small>
This commit is contained in:
parent
e3f3e9defb
commit
90f343e5bd
5 changed files with 209 additions and 13 deletions
10
js/reveal.js
10
js/reveal.js
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue