changed theme file swap to be relative to theme file instead of slide-deck
This commit is contained in:
parent
aa97d80d53
commit
495cb98005
11
js/reveal.js
11
js/reveal.js
@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
* reveal.js 2.0 r21
|
* reveal.js 2.0 r22
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://lab.hakim.se/reveal-js
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
@ -228,12 +228,16 @@ var Reveal = (function(){
|
|||||||
|
|
||||||
// Load the theme in the config, if it's not already loaded
|
// Load the theme in the config, if it's not already loaded
|
||||||
if( config.theme && dom.theme ) {
|
if( config.theme && dom.theme ) {
|
||||||
var themeURL = 'css/theme/' + config.theme + '.css';
|
var themeURL = dom.theme.getAttribute( 'href' );
|
||||||
if( dom.theme.getAttribute( 'href' ) !== themeURL ) {
|
var themeFinder = /[^/]*?(?=\.css)/;
|
||||||
|
var themeName = themeURL.match(themeFinder)[0];
|
||||||
|
if( config.theme !== themeName ) {
|
||||||
|
themeURL = themeURL.replace(themeFinder, config.theme);
|
||||||
dom.theme.setAttribute( 'href', themeURL );
|
dom.theme.setAttribute( 'href', themeURL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( config.transition !== 'default' ) {
|
if( config.transition !== 'default' ) {
|
||||||
dom.wrapper.classList.add( config.transition );
|
dom.wrapper.classList.add( config.transition );
|
||||||
}
|
}
|
||||||
@ -1143,4 +1147,3 @@ var Reveal = (function(){
|
|||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
68
js/reveal.min.js
vendored
68
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user