Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
55f220109c
15 files changed
+308
-178
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
/* global module:false */
|
/* global module:false */
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
|
var port = grunt.option('port') || 8000;
|
||||||
// Project configuration
|
// Project configuration
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
@@ -78,7 +78,7 @@ module.exports = function(grunt) {
|
|||||||
connect: {
|
connect: {
|
||||||
server: {
|
server: {
|
||||||
options: {
|
options: {
|
||||||
port: 8000,
|
port: port,
|
||||||
base: '.'
|
base: '.'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -778,6 +778,8 @@ $ grunt serve
|
|||||||
|
|
||||||
8. Open <http://localhost:8000> to view your presentation
|
8. Open <http://localhost:8000> to view your presentation
|
||||||
|
|
||||||
|
You can change the port by using `grunt serve --port 8001`.
|
||||||
|
|
||||||
|
|
||||||
### Folder Structure
|
### Folder Structure
|
||||||
- **css/** Core styles without which the project does not function
|
- **css/** Core styles without which the project does not function
|
||||||
@@ -786,6 +788,23 @@ $ grunt serve
|
|||||||
- **lib/** All other third party assets (JavaScript, CSS, fonts)
|
- **lib/** All other third party assets (JavaScript, CSS, fonts)
|
||||||
|
|
||||||
|
|
||||||
|
### Contributing
|
||||||
|
|
||||||
|
Please keep the [issue tracker](github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**. If you are reporting a bug make sure to include information about which browser and operating system you are using as well as the necessary steps to reproduce the issue.
|
||||||
|
|
||||||
|
If you have personal support questions use [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).
|
||||||
|
|
||||||
|
|
||||||
|
#### Pull requests
|
||||||
|
|
||||||
|
- Should follow the coding style
|
||||||
|
- Tabs to indent
|
||||||
|
- Single-quoted strings
|
||||||
|
- No space between function name and opening argument parenthesis
|
||||||
|
- One space after opening and before closing parenthesis
|
||||||
|
- Should be made towards the **dev branch**
|
||||||
|
- Should be submitted from a feature/topic branch (not your master)
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -517,6 +517,10 @@ body {
|
|||||||
perspective-origin: 0px -100px;
|
perspective-origin: 0px -100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reveal .slides>section {
|
||||||
|
-ms-perspective: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
.reveal .slides>section,
|
.reveal .slides>section,
|
||||||
.reveal .slides>section>section {
|
.reveal .slides>section>section {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -1050,8 +1054,8 @@ body {
|
|||||||
|
|
||||||
.reveal.fade.overview .slides section,
|
.reveal.fade.overview .slides section,
|
||||||
.reveal.fade.overview .slides>section>section,
|
.reveal.fade.overview .slides>section>section,
|
||||||
.reveal.fade.exit-overview .slides section,
|
.reveal.fade.overview-deactivating .slides section,
|
||||||
.reveal.fade.exit-overview .slides>section>section {
|
.reveal.fade.overview-deactivating .slides>section>section {
|
||||||
-webkit-transition: none;
|
-webkit-transition: none;
|
||||||
-moz-transition: none;
|
-moz-transition: none;
|
||||||
-ms-transition: none;
|
-ms-transition: none;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -4,4 +4,4 @@
|
|||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
|
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
|
||||||
*/ html,body,.reveal div,.reveal span,.reveal applet,.reveal object,.reveal iframe,.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6,.reveal p,.reveal blockquote,.reveal pre,.reveal a,.reveal abbr,.reveal acronym,.reveal address,.reveal big,.reveal cite,.reveal code,.reveal del,.reveal dfn,.reveal em,.reveal img,.reveal ins,.reveal kbd,.reveal q,.reveal s,.reveal samp,.reveal small,.reveal strike,.reveal strong,.reveal sub,.reveal sup,.reveal tt,.reveal var,.reveal b,.reveal u,.reveal i,.reveal center,.reveal dl,.reveal dt,.reveal dd,.reveal ol,.reveal ul,.reveal li,.reveal fieldset,.reveal form,.reveal label,.reveal legend,.reveal table,.reveal caption,.reveal tbody,.reveal tfoot,.reveal thead,.reveal tr,.reveal th,.reveal td,.reveal article,.reveal aside,.reveal canvas,.reveal details,.reveal embed,.reveal figure,.reveal figcaption,.reveal footer,.reveal header,.reveal hgroup,.reveal menu,.reveal nav,.reveal output,.reveal ruby,.reveal section,.reveal summary,.reveal time,.reveal mark,.reveal audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.reveal article,.reveal aside,.reveal details,.reveal figcaption,.reveal figure,.reveal footer,.reveal header,.reveal hgroup,.reveal menu,.reveal nav,.reveal section{display:block}html,body{width:100%;height:100%;overflow:hidden}body{position:relative;line-height:1}::selection{background:#FF5E99;color:#fff;text-shadow:none}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;word-wrap:break-word;line-height:1}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal .slides section .fragment{opacity:0;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-ms-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.reveal .slides section .fragment.visible{opacity:1}.reveal .slides section .fragment.grow{opacity:1}.reveal .slides section .fragment.grow.visible{-webkit-transform:scale(1.3);-moz-transform:scale(1.3);-ms-transform:scale(1.3);-o-transform:scale(1.3);transform:scale(1.3)}.reveal .slides section .fragment.shrink{opacity:1}.reveal .slides section .fragment.shrink.visible{-webkit-transform:scale(0.7);-moz-transform:scale(0.7);-ms-transform:scale(0.7);-o-transform:scale(0.7);transform:scale(0.7)}.reveal .slides section .fragment.zoom-in{opacity:0;-webkit-transform:scale(0.1);-moz-transform:scale(0.1);-ms-transform:scale(0.1);-o-transform:scale(0.1);transform:scale(0.1)}.reveal .slides section .fragment.zoom-in.visible{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}.reveal .slides section .fragment.roll-in{opacity:0;-webkit-transform:rotateX(90deg);-moz-transform:rotateX(90deg);-ms-transform:rotateX(90deg);-o-transform:rotateX(90deg);transform:rotateX(90deg)}.reveal .slides section .fragment.roll-in.visible{opacity:1;-webkit-transform:rotateX(0);-moz-transform:rotateX(0);-ms-transform:rotateX(0);-o-transform:rotateX(0);transform:rotateX(0)}.reveal .slides section .fragment.fade-out{opacity:1}.reveal .slides section .fragment.fade-out.visible{opacity:0}.reveal .slides section .fragment.semi-fade-out{opacity:1}.reveal .slides section .fragment.semi-fade-out.visible{opacity:.5}.reveal .slides section .fragment.highlight-red,.reveal .slides section .fragment.highlight-green,.reveal .slides section .fragment.highlight-blue{opacity:1}.reveal .slides section .fragment.highlight-red.visible{color:#ff2c2d}.reveal .slides section .fragment.highlight-green.visible{color:#17ff2e}.reveal .slides section .fragment.highlight-blue.visible{color:#1b91ff}.reveal:after{content:'';font-style:italic}.reveal iframe{z-index:1}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal a{position:relative}.reveal strong,.reveal b{font-weight:700}.reveal em,.reveal i{font-style:italic}.reveal ol,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal p{margin-bottom:10px;line-height:1.2em}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:5px auto;padding:5px;font-style:italic;background:rgba(255,255,255,.05);box-shadow:0 0 2px rgba(0,0,0,.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:15px auto;text-align:left;font-size:.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0 0 6px rgba(0,0,0,.3)}.reveal code{font-family:monospace}.reveal pre code{padding:5px;overflow:auto;max-height:400px;word-wrap:normal}.reveal pre.stretch code{heigLine truncated
|
*/ html,body,.reveal div,.reveal span,.reveal applet,.reveal object,.reveal iframe,.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6,.reveal p,.reveal blockquote,.reveal pre,.reveal a,.reveal abbr,.reveal acronym,.reveal address,.reveal big,.reveal cite,.reveal code,.reveal del,.reveal dfn,.reveal em,.reveal img,.reveal ins,.reveal kbd,.reveal q,.reveal s,.reveal samp,.reveal small,.reveal strike,.reveal strong,.reveal sub,.reveal sup,.reveal tt,.reveal var,.reveal b,.reveal u,.reveal i,.reveal center,.reveal dl,.reveal dt,.reveal dd,.reveal ol,.reveal ul,.reveal li,.reveal fieldset,.reveal form,.reveal label,.reveal legend,.reveal table,.reveal caption,.reveal tbody,.reveal tfoot,.reveal thead,.reveal tr,.reveal th,.reveal td,.reveal article,.reveal aside,.reveal canvas,.reveal details,.reveal embed,.reveal figure,.reveal figcaption,.reveal footer,.reveal header,.reveal hgroup,.reveal menu,.reveal nav,.reveal output,.reveal ruby,.reveal section,.reveal summary,.reveal time,.reveal mark,.reveal audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.reveal article,.reveal aside,.reveal details,.reveal figcaption,.reveal figure,.reveal footer,.reveal header,.reveal hgroup,.reveal menu,.reveal nav,.reveal section{display:block}html,body{width:100%;height:100%;overflow:hidden}body{position:relative;line-height:1}::selection{background:#FF5E99;color:#fff;text-shadow:none}.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6{-webkit-hyphens:auto;-moz-hyphens:auto;hyphens:auto;word-wrap:break-word;line-height:1}.reveal h1{font-size:3.77em}.reveal h2{font-size:2.11em}.reveal h3{font-size:1.55em}.reveal h4{font-size:1em}.reveal .slides section .fragment{opacity:0;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-ms-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease}.reveal .slides section .fragment.visible{opacity:1}.reveal .slides section .fragment.grow{opacity:1}.reveal .slides section .fragment.grow.visible{-webkit-transform:scale(1.3);-moz-transform:scale(1.3);-ms-transform:scale(1.3);-o-transform:scale(1.3);transform:scale(1.3)}.reveal .slides section .fragment.shrink{opacity:1}.reveal .slides section .fragment.shrink.visible{-webkit-transform:scale(0.7);-moz-transform:scale(0.7);-ms-transform:scale(0.7);-o-transform:scale(0.7);transform:scale(0.7)}.reveal .slides section .fragment.zoom-in{opacity:0;-webkit-transform:scale(0.1);-moz-transform:scale(0.1);-ms-transform:scale(0.1);-o-transform:scale(0.1);transform:scale(0.1)}.reveal .slides section .fragment.zoom-in.visible{opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}.reveal .slides section .fragment.roll-in{opacity:0;-webkit-transform:rotateX(90deg);-moz-transform:rotateX(90deg);-ms-transform:rotateX(90deg);-o-transform:rotateX(90deg);transform:rotateX(90deg)}.reveal .slides section .fragment.roll-in.visible{opacity:1;-webkit-transform:rotateX(0);-moz-transform:rotateX(0);-ms-transform:rotateX(0);-o-transform:rotateX(0);transform:rotateX(0)}.reveal .slides section .fragment.fade-out{opacity:1}.reveal .slides section .fragment.fade-out.visible{opacity:0}.reveal .slides section .fragment.semi-fade-out{opacity:1}.reveal .slides section .fragment.semi-fade-out.visible{opacity:.5}.reveal .slides section .fragment.highlight-red,.reveal .slides section .fragment.highlight-green,.reveal .slides section .fragment.highlight-blue{opacity:1}.reveal .slides section .fragment.highlight-red.visible{color:#ff2c2d}.reveal .slides section .fragment.highlight-green.visible{color:#17ff2e}.reveal .slides section .fragment.highlight-blue.visible{color:#1b91ff}.reveal:after{content:'';font-style:italic}.reveal iframe{z-index:1}.reveal img,.reveal video,.reveal iframe{max-width:95%;max-height:95%}.reveal a{position:relative}.reveal strong,.reveal b{font-weight:700}.reveal em,.reveal i{font-style:italic}.reveal ol,.reveal ul{display:inline-block;text-align:left;margin:0 0 0 1em}.reveal ol{list-style-type:decimal}.reveal ul{list-style-type:disc}.reveal ul ul{list-style-type:square}.reveal ul ul ul{list-style-type:circle}.reveal ul ul,.reveal ul ol,.reveal ol ol,.reveal ol ul{display:block;margin-left:40px}.reveal p{margin-bottom:10px;line-height:1.2em}.reveal q,.reveal blockquote{quotes:none}.reveal blockquote{display:block;position:relative;width:70%;margin:5px auto;padding:5px;font-style:italic;background:rgba(255,255,255,.05);box-shadow:0 0 2px rgba(0,0,0,.2)}.reveal blockquote p:first-child,.reveal blockquote p:last-child{display:inline-block}.reveal q{font-style:italic}.reveal pre{display:block;position:relative;width:90%;margin:15px auto;text-align:left;font-size:.55em;font-family:monospace;line-height:1.2em;word-wrap:break-word;box-shadow:0 0 6px rgba(0,0,0,.3)}.reveal code{font-family:monospace}.reveal pre code{padding:5px;overflow:auto;max-height:400px;word-wrap:normal}.reveal pre.stretch code{heigLine truncated
|
||||||
+7
-4
@@ -167,12 +167,15 @@
|
|||||||
<h2>Themes</h2>
|
<h2>Themes</h2>
|
||||||
<p>
|
<p>
|
||||||
Reveal.js comes with a few themes built in: <br>
|
Reveal.js comes with a few themes built in: <br>
|
||||||
|
<a href="?#/themes">Default</a> -
|
||||||
<a href="?theme=sky#/themes">Sky</a> -
|
<a href="?theme=sky#/themes">Sky</a> -
|
||||||
<a href="?theme=beige#/themes">Beige</a> -
|
<a href="?theme=beige#/themes">Beige</a> -
|
||||||
<a href="?theme=simple#/themes">Simple</a> -
|
<a href="?theme=simple#/themes">Simple</a> -
|
||||||
<a href="?theme=serif#/themes">Serif</a> -
|
<a href="?theme=serif#/themes">Serif</a> -
|
||||||
<a href="?theme=night#/themes">Night</a> -
|
<a href="?theme=night#/themes">Night</a> <br>
|
||||||
<a href="?#/themes">Default</a>
|
<a href="?theme=moon.css#/themes">Moon</a> -
|
||||||
|
<a href="?theme=simple.css#/themes">Simple</a> -
|
||||||
|
<a href="?theme=solarized.css#/themes">Solarized</a>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<small>
|
<small>
|
||||||
@@ -259,10 +262,10 @@ function linkify( selector ) {
|
|||||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||||
var node = nodes[i];
|
var node = nodes[i];
|
||||||
|
|
||||||
if( !node.className ) ) {
|
if( !node.className ) {
|
||||||
node.className += ' roll';
|
node.className += ' roll';
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|||||||
+74
-90
@@ -74,6 +74,9 @@ var Reveal = (function(){
|
|||||||
// Apply a 3D roll to links on hover
|
// Apply a 3D roll to links on hover
|
||||||
rollingLinks: false,
|
rollingLinks: false,
|
||||||
|
|
||||||
|
// Hides the address bar on mobile devices
|
||||||
|
hideAddressBar: true,
|
||||||
|
|
||||||
// Opens links in an iframe preview overlay
|
// Opens links in an iframe preview overlay
|
||||||
previewLinks: false,
|
previewLinks: false,
|
||||||
|
|
||||||
@@ -353,17 +356,15 @@ var Reveal = (function(){
|
|||||||
createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null );
|
createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null );
|
||||||
|
|
||||||
// Cache references to elements
|
// Cache references to elements
|
||||||
if ( config.controls ) {
|
dom.controls = document.querySelector( '.reveal .controls' );
|
||||||
dom.controls = document.querySelector( '.reveal .controls' );
|
|
||||||
|
|
||||||
// There can be multiple instances of controls throughout the page
|
// There can be multiple instances of controls throughout the page
|
||||||
dom.controlsLeft = toArray( document.querySelectorAll( '.navigate-left' ) );
|
dom.controlsLeft = toArray( document.querySelectorAll( '.navigate-left' ) );
|
||||||
dom.controlsRight = toArray( document.querySelectorAll( '.navigate-right' ) );
|
dom.controlsRight = toArray( document.querySelectorAll( '.navigate-right' ) );
|
||||||
dom.controlsUp = toArray( document.querySelectorAll( '.navigate-up' ) );
|
dom.controlsUp = toArray( document.querySelectorAll( '.navigate-up' ) );
|
||||||
dom.controlsDown = toArray( document.querySelectorAll( '.navigate-down' ) );
|
dom.controlsDown = toArray( document.querySelectorAll( '.navigate-down' ) );
|
||||||
dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) );
|
dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) );
|
||||||
dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) );
|
dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) );
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,13 +492,8 @@ var Reveal = (function(){
|
|||||||
dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );
|
dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );
|
||||||
dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );
|
dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );
|
||||||
|
|
||||||
if( dom.controls ) {
|
dom.controls.style.display = config.controls ? 'block' : 'none';
|
||||||
dom.controls.style.display = ( config.controls && dom.controls ) ? 'block' : 'none';
|
dom.progress.style.display = config.progress ? 'block' : 'none';
|
||||||
}
|
|
||||||
|
|
||||||
if( dom.progress ) {
|
|
||||||
dom.progress.style.display = ( config.progress && dom.progress ) ? 'block' : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
if( config.rtl ) {
|
if( config.rtl ) {
|
||||||
dom.wrapper.classList.add( 'rtl' );
|
dom.wrapper.classList.add( 'rtl' );
|
||||||
@@ -586,16 +582,14 @@ var Reveal = (function(){
|
|||||||
dom.progress.addEventListener( 'click', onProgressClicked, false );
|
dom.progress.addEventListener( 'click', onProgressClicked, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( config.controls && dom.controls ) {
|
[ 'touchstart', 'click' ].forEach( function( eventName ) {
|
||||||
[ 'touchstart', 'click' ].forEach( function( eventName ) {
|
dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } );
|
||||||
dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } );
|
dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } );
|
||||||
dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } );
|
dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } );
|
||||||
dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } );
|
dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } );
|
||||||
dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } );
|
dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } );
|
||||||
dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } );
|
dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } );
|
||||||
dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } );
|
} );
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,16 +618,14 @@ var Reveal = (function(){
|
|||||||
dom.progress.removeEventListener( 'click', onProgressClicked, false );
|
dom.progress.removeEventListener( 'click', onProgressClicked, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( config.controls && dom.controls ) {
|
[ 'touchstart', 'click' ].forEach( function( eventName ) {
|
||||||
[ 'touchstart', 'click' ].forEach( function( eventName ) {
|
dom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );
|
||||||
dom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );
|
dom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );
|
||||||
dom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );
|
dom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );
|
||||||
dom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );
|
dom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );
|
||||||
dom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );
|
dom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );
|
||||||
dom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );
|
dom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );
|
||||||
dom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );
|
} );
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -778,7 +770,7 @@ var Reveal = (function(){
|
|||||||
*/
|
*/
|
||||||
function hideAddressBar() {
|
function hideAddressBar() {
|
||||||
|
|
||||||
if( /iphone|ipod|android/gi.test( navigator.userAgent ) && !/crios/gi.test( navigator.userAgent ) ) {
|
if( config.hideAddressBar && isMobileDevice ) {
|
||||||
// Events that should trigger the address bar to hide
|
// Events that should trigger the address bar to hide
|
||||||
window.addEventListener( 'load', removeAddressBar, false );
|
window.addEventListener( 'load', removeAddressBar, false );
|
||||||
window.addEventListener( 'orientationchange', removeAddressBar, false );
|
window.addEventListener( 'orientationchange', removeAddressBar, false );
|
||||||
@@ -792,7 +784,8 @@ var Reveal = (function(){
|
|||||||
*/
|
*/
|
||||||
function removeAddressBar() {
|
function removeAddressBar() {
|
||||||
|
|
||||||
if( window.orientation === 0 ) {
|
// Portrait and not Chrome for iOS
|
||||||
|
if( window.orientation === 0 && !/crios/gi.test( navigator.userAgent ) ) {
|
||||||
document.documentElement.style.overflow = 'scroll';
|
document.documentElement.style.overflow = 'scroll';
|
||||||
document.body.style.height = '120%';
|
document.body.style.height = '120%';
|
||||||
}
|
}
|
||||||
@@ -1156,7 +1149,7 @@ var Reveal = (function(){
|
|||||||
var depth = window.innerWidth < 400 ? 1000 : 2500;
|
var depth = window.innerWidth < 400 ? 1000 : 2500;
|
||||||
|
|
||||||
dom.wrapper.classList.add( 'overview' );
|
dom.wrapper.classList.add( 'overview' );
|
||||||
dom.wrapper.classList.remove( 'exit-overview' );
|
dom.wrapper.classList.remove( 'overview-deactivating' );
|
||||||
|
|
||||||
clearTimeout( activateOverviewTimeout );
|
clearTimeout( activateOverviewTimeout );
|
||||||
clearTimeout( deactivateOverviewTimeout );
|
clearTimeout( deactivateOverviewTimeout );
|
||||||
@@ -1164,7 +1157,7 @@ var Reveal = (function(){
|
|||||||
// Not the pretties solution, but need to let the overview
|
// Not the pretties solution, but need to let the overview
|
||||||
// class apply first so that slides are measured accurately
|
// class apply first so that slides are measured accurately
|
||||||
// before we can position them
|
// before we can position them
|
||||||
activateOverviewTimeout = setTimeout( function(){
|
activateOverviewTimeout = setTimeout( function() {
|
||||||
|
|
||||||
var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
|
var horizontalSlides = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
|
||||||
|
|
||||||
@@ -1241,25 +1234,19 @@ var Reveal = (function(){
|
|||||||
// Temporarily add a class so that transitions can do different things
|
// Temporarily add a class so that transitions can do different things
|
||||||
// depending on whether they are exiting/entering overview, or just
|
// depending on whether they are exiting/entering overview, or just
|
||||||
// moving from slide to slide
|
// moving from slide to slide
|
||||||
dom.wrapper.classList.add( 'exit-overview' );
|
dom.wrapper.classList.add( 'overview-deactivating' );
|
||||||
|
|
||||||
deactivateOverviewTimeout = setTimeout( function () {
|
deactivateOverviewTimeout = setTimeout( function () {
|
||||||
dom.wrapper.classList.remove( 'exit-overview' );
|
dom.wrapper.classList.remove( 'overview-deactivating' );
|
||||||
}, 10);
|
}, 1 );
|
||||||
|
|
||||||
// Select all slides
|
// Select all slides
|
||||||
var slides = toArray( document.querySelectorAll( SLIDES_SELECTOR ) );
|
toArray( document.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) {
|
||||||
|
|
||||||
for( var i = 0, len = slides.length; i < len; i++ ) {
|
|
||||||
var element = slides[i];
|
|
||||||
|
|
||||||
element.style.display = '';
|
|
||||||
|
|
||||||
// Resets all transforms to use the external styles
|
// Resets all transforms to use the external styles
|
||||||
transformElement( element, '' );
|
transformElement( slide, '' );
|
||||||
|
|
||||||
element.removeEventListener( 'click', onOverviewSlideClicked, true );
|
slide.removeEventListener( 'click', onOverviewSlideClicked, true );
|
||||||
}
|
} );
|
||||||
|
|
||||||
slide( indexh, indexv );
|
slide( indexh, indexv );
|
||||||
|
|
||||||
@@ -1792,48 +1779,45 @@ var Reveal = (function(){
|
|||||||
*/
|
*/
|
||||||
function updateControls() {
|
function updateControls() {
|
||||||
|
|
||||||
if ( config.controls && dom.controls ) {
|
var routes = availableRoutes();
|
||||||
|
var fragments = availableFragments();
|
||||||
|
|
||||||
var routes = availableRoutes();
|
// Remove the 'enabled' class from all directions
|
||||||
var fragments = availableFragments();
|
dom.controlsLeft.concat( dom.controlsRight )
|
||||||
|
.concat( dom.controlsUp )
|
||||||
|
.concat( dom.controlsDown )
|
||||||
|
.concat( dom.controlsPrev )
|
||||||
|
.concat( dom.controlsNext ).forEach( function( node ) {
|
||||||
|
node.classList.remove( 'enabled' );
|
||||||
|
node.classList.remove( 'fragmented' );
|
||||||
|
} );
|
||||||
|
|
||||||
// Remove the 'enabled' class from all directions
|
// Add the 'enabled' class to the available routes
|
||||||
dom.controlsLeft.concat( dom.controlsRight )
|
if( routes.left ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
||||||
.concat( dom.controlsUp )
|
if( routes.right ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
||||||
.concat( dom.controlsDown )
|
if( routes.up ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
||||||
.concat( dom.controlsPrev )
|
if( routes.down ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
||||||
.concat( dom.controlsNext ).forEach( function( node ) {
|
|
||||||
node.classList.remove( 'enabled' );
|
|
||||||
node.classList.remove( 'fragmented' );
|
|
||||||
} );
|
|
||||||
|
|
||||||
// Add the 'enabled' class to the available routes
|
// Prev/next buttons
|
||||||
if( routes.left ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
if( routes.left || routes.up ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
||||||
if( routes.right ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
if( routes.right || routes.down ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
||||||
if( routes.up ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
|
||||||
if( routes.down ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
|
||||||
|
|
||||||
// Prev/next buttons
|
// Highlight fragment directions
|
||||||
if( routes.left || routes.up ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
if( currentSlide ) {
|
||||||
if( routes.right || routes.down ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'enabled' ); } );
|
|
||||||
|
|
||||||
// Highlight fragment directions
|
// Always apply fragment decorator to prev/next buttons
|
||||||
if( currentSlide ) {
|
if( fragments.prev ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
||||||
|
if( fragments.next ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
||||||
|
|
||||||
// Always apply fragment decorator to prev/next buttons
|
// Apply fragment decorators to directional buttons based on
|
||||||
if( fragments.prev ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
// what slide axis they are in
|
||||||
if( fragments.next ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
if( isVerticalSlide( currentSlide ) ) {
|
||||||
|
if( fragments.prev ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
||||||
// Apply fragment decorators to directional buttons based on
|
if( fragments.next ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
||||||
// what slide axis they are in
|
}
|
||||||
if( isVerticalSlide( currentSlide ) ) {
|
else {
|
||||||
if( fragments.prev ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
if( fragments.prev ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
||||||
if( fragments.next ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
if( fragments.next ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
||||||
}
|
|
||||||
else {
|
|
||||||
if( fragments.prev ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
|
||||||
if( fragments.next ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
* reveal.js 2.6.0-dev (2013-08-24, 15:09)
|
* reveal.js 2.6.0-dev (2013-09-11, 21:54)
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://lab.hakim.se/reveal-js
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
|
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
|
||||||
*/
|
*/
|
||||||
var Reveal=function(){"use strict";function e(e){return t(),Ht||Rt?(window.addEventListener("load",T,!1),u(Ut,e),y(),n(),void 0):(document.body.setAttribute("class","no-transforms"),void 0)}function t(){Rt="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,Ht="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,Yt=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function n(){function e(){n.length&&head.js.apply(null,n),r()}for(var t=[],n=[],o=0,a=Ut.dependencies.length;a>o;o++){var i=Ut.dependencies[o];(!i.condition||i.condition())&&(i.async?n.push(i.src):t.push(i.src),"function"==typeof i.callback&&head.ready(i.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],i.callback))}t.length?(head.ready(e),head.js.apply(null,t)):e()}function r(){a(),o(),c(),J(),setTimeout(function(){$t.slides.classList.remove("no-transition"),jt=!0,w("ready",{indexh:Pt,indexv:Dt,currentSlide:It})},1)}function o(){var e=f(document.querySelectorAll(Ot));e.forEach(function(e){var t=f(e.querySelectorAll("section"));t.forEach(function(e,t){t>0&&e.classList.add("future")})})}function a(){$t.theme=document.querySelector("#theme"),$t.wrapper=document.querySelector(".reveal"),$t.slides=document.querySelector(".reveal .slides"),$t.slides.classList.add("no-transition"),$t.background=i($t.wrapper,"div","backgrounds",null),$t.progress=i($t.wrapper,"div","progress","<span></span>"),$t.progressbar=$t.progress.querySelector("span"),i($t.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),i($t.wrapper,"div","state-background",null),i($t.wrapper,"div","pause-overlay",null),Ut.controls&&($t.controls=document.querySelector(".reveal .controls"),$t.controlsLeft=f(document.querySelectorAll(".navigate-left")),$t.controlsRight=f(document.querySelectorAll(".navigate-right")),$t.controlsUp=f(document.querySelectorAll(".navigate-up")),$t.controlsDown=f(document.querySelectorAll(".navigate-down")),$t.controlsPrev=f(document.querySelectorAll(".navigate-prev")),$t.controlsNext=f(document.querySelectorAll(".navigate-next")))}function i(e,t,n,r){var o=e.querySelector("."+n);return o||(o=document.createElement(t),o.classList.add(n),null!==r&&(o.innerHTML=r),e.appendChild(o)),o}function s(){function e(e,t){var n={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition")},r=document.createElement("div");return r.className="slide-background",n.background&&(/^(http|file|\/\/)/gi.test(n.background)||/\.(png|jpg|jpeg|gif|bmp)$/gi.test(n.background)?r.style.backgroundImage="url("+n.background+")":r.style.background=n.background),n.backgroundSize&&(r.style.backgroundSize=n.backgroundSize),n.backgroundImage&&(r.style.backgroundImage='url("'+n.backgroundImage+'")'),n.backgroundColor&&(r.style.backgroundColor=n.backgroundColor),n.backgroundRepeat&&(r.style.backgroundRepeat=n.backgroundRepeat),n.backgroundPosition&&(r.style.backgroundPosition=n.backgroundPosition),n.backgroundTransition&&r.setAttribute("data-background-transition",n.backgroundTransition),t.appendChild(r),r}h()&&document.body.classList.add("print-pdf"),$t.background.innerHTML="",$t.background.classList.add("no-transition"),f(document.querySelectorAll(Ot)).forEach(function(t){var n;n=h()?e(t,t):e(t,$t.background),f(t.querySelectorAll("section")).forEach(function(t){h()?e(t,t):e(t,n)})})}function c(e){if($t.wrapper.classList.remove(Ut.transition),"object"==typeof e&&u(Ut,e),Rt===!1&&(Ut.transition="linear"),$t.wrapper.classList.add(Ut.transition),$t.wrapper.setAttribute("data-transition-speed",Ut.transitionSpeed),$t.wrapper.setAttribute("data-background-transition",Ut.backgroundTransition),$t.controls&&($t.controls.style.display=Ut.controls&&$t.controls?"block":"none"),$t.progress&&($t.progress.style.display=Ut.progress&&$t.progress?"block":"none"),Ut.rtl?$t.wrapper.classList.add("rtl"):$t.wrapper.classList.remove("rtl"),Ut.center?$t.wrapper.classList.add("center"):$t.wrapper.classList.remove("center"),Ut.mouseWheel?(document.addEventListener("DOMMouseScroll",bt,!1),document.addEventListener("mousewheel",bt,!1)):(document.removeEventListener("DOMMouseScroll",bt,!1),document.removeEventListener("mousewheel",bt,!1)),Ut.rollingLinks?L():E(),Ut.previewLinks?k():(S(),k("[data-preview-link]")),Ut.theme&&$t.theme){var t=$t.theme.getAttribute("href"),n=/[^\/]*?(?=\.css)/,r=t.match(n)[0];Ut.theme!==r&&(t=t.reLine truncated
|
var Reveal=function(){"use strict";function a(a){return b(),Kb||Jb?(window.addEventListener("load",C,!1),l(Qb,a),s(),c(),void 0):(document.body.setAttribute("class","no-transforms"),void 0)}function b(){Jb="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,Kb="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,Lb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){c.length&&head.js.apply(null,c),d()}for(var b=[],c=[],e=0,f=Qb.dependencies.length;f>e;e++){var g=Qb.dependencies[e];(!g.condition||g.condition())&&(g.async?c.push(g.src):b.push(g.src),"function"==typeof g.callback&&head.ready(g.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],g.callback))}b.length?(head.ready(a),head.js.apply(null,b)):a()}function d(){f(),e(),i(),_(),setTimeout(function(){Vb.slides.classList.remove("no-transition"),Rb=!0,u("ready",{indexh:Fb,indexv:Gb,currentSlide:Ib})},1)}function e(){var a=m(document.querySelectorAll(Nb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a,b){b>0&&a.classList.add("future")})})}function f(){Vb.theme=document.querySelector("#theme"),Vb.wrapper=document.querySelector(".reveal"),Vb.slides=document.querySelector(".reveal .slides"),Vb.slides.classList.add("no-transition"),Vb.background=g(Vb.wrapper,"div","backgrounds",null),Vb.progress=g(Vb.wrapper,"div","progress","<span></span>"),Vb.progressbar=Vb.progress.querySelector("span"),g(Vb.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),g(Vb.wrapper,"div","state-background",null),g(Vb.wrapper,"div","pause-overlay",null),Vb.controls=document.querySelector(".reveal .controls"),Vb.controlsLeft=m(document.querySelectorAll(".navigate-left")),Vb.controlsRight=m(document.querySelectorAll(".navigate-right")),Vb.controlsUp=m(document.querySelectorAll(".navigate-up")),Vb.controlsDown=m(document.querySelectorAll(".navigate-down")),Vb.controlsPrev=m(document.querySelectorAll(".navigate-prev")),Vb.controlsNext=m(document.querySelectorAll(".navigate-next"))}function g(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function h(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),Vb.background.innerHTML="",Vb.background.classList.add("no-transition"),m(document.querySelectorAll(Nb)).forEach(function(b){var c;c=r()?a(b,b):a(b,Vb.background),m(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})})}function i(a){if(Vb.wrapper.classList.remove(Qb.transition),"object"==typeof a&&l(Qb,a),Jb===!1&&(Qb.transition="linear"),Vb.wrapper.classList.add(Qb.transition),Vb.wrapper.setAttribute("data-transition-speed",Qb.transitionSpeed),Vb.wrapper.setAttribute("data-background-transition",Qb.backgroundTransition),Vb.controls.style.display=Qb.controls?"block":"none",Vb.progress.style.display=Qb.progress?"block":"none",Qb.rtl?Vb.wrapper.classList.add("rtl"):Vb.wrapper.classList.remove("rtl"),Qb.center?Vb.wrapper.classList.add("center"):Vb.wrapper.classList.remove("center"),Qb.mouseWheel?(document.addEventListener("DOMMouseScroll",tb,!1),document.addEventListener("mousewheel",tb,!1)):(document.removeEventListener("DOMMouseScroll",tb,!1),document.removeEventListener("mousewheel",tb,!1)),Qb.rollingLinks?v():w(),Qb.previewLinks?x():(y(),x("[data-preview-link]")),Qb.theme&&Vb.theme){var b=Vb.theme.getAttribute("href"),c=/[^\/]*?(?=\.css)/,d=b.match(c)[0];Qb.theme!==d&&(b=b.replace(c,Qb.theme),Vb.theme.setAttribute("href",b))}R()}function j(){_b=Line truncated
|
||||||
+16
-17
@@ -13,11 +13,13 @@ pre code {
|
|||||||
|
|
||||||
pre .keyword,
|
pre .keyword,
|
||||||
pre .tag,
|
pre .tag,
|
||||||
pre .django .tag,
|
|
||||||
pre .django .keyword,
|
|
||||||
pre .css .class,
|
pre .css .class,
|
||||||
pre .css .id,
|
pre .css .id,
|
||||||
pre .lisp .title {
|
pre .lisp .title,
|
||||||
|
pre .nginx .title,
|
||||||
|
pre .request,
|
||||||
|
pre .status,
|
||||||
|
pre .clojure .attribute {
|
||||||
color: #E3CEAB;
|
color: #E3CEAB;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,32 +51,27 @@ pre .tex .special {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pre .diff .chunk,
|
pre .diff .chunk,
|
||||||
pre .ruby .subst {
|
pre .subst {
|
||||||
color: #8F8F8F;
|
color: #8F8F8F;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre .dos .keyword,
|
pre .dos .keyword,
|
||||||
pre .python .decorator,
|
pre .python .decorator,
|
||||||
pre .class .title,
|
pre .title,
|
||||||
pre .haskell .label,
|
pre .haskell .type,
|
||||||
pre .function .title,
|
|
||||||
pre .ini .title,
|
|
||||||
pre .diff .header,
|
pre .diff .header,
|
||||||
pre .ruby .class .parent,
|
pre .ruby .class .parent,
|
||||||
pre .apache .tag,
|
pre .apache .tag,
|
||||||
pre .nginx .built_in,
|
pre .nginx .built_in,
|
||||||
pre .tex .command,
|
pre .tex .command,
|
||||||
pre .input_number {
|
pre .prompt {
|
||||||
color: #efef8f;
|
color: #efef8f;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre .dos .winutils,
|
pre .dos .winutils,
|
||||||
pre .ruby .symbol,
|
pre .ruby .symbol,
|
||||||
pre .ruby .symbol .string,
|
pre .ruby .symbol .string,
|
||||||
pre .ruby .symbol .keyword,
|
pre .ruby .string {
|
||||||
pre .ruby .symbol .keymethods,
|
|
||||||
pre .ruby .string,
|
|
||||||
pre .ruby .instancevar {
|
|
||||||
color: #DCA3A3;
|
color: #DCA3A3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,10 +103,12 @@ pre .doctype {
|
|||||||
color: #7F9F7F;
|
color: #7F9F7F;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre .xml .css,
|
pre .coffeescript .javascript,
|
||||||
|
pre .javascript .xml,
|
||||||
|
pre .tex .formula,
|
||||||
pre .xml .javascript,
|
pre .xml .javascript,
|
||||||
pre .xml .vbscript,
|
pre .xml .vbscript,
|
||||||
pre .tex .formula {
|
pre .xml .css,
|
||||||
|
pre .xml .cdata {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
+7
-7
@@ -21,19 +21,19 @@
|
|||||||
"node": "~0.8.0"
|
"node": "~0.8.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"underscore": "~1.3.3",
|
"underscore": "~1.5.1",
|
||||||
"express": "~2.5.9",
|
"express": "~2.5.9",
|
||||||
"mustache": "~0.4.0",
|
"mustache": "~0.7.2",
|
||||||
"socket.io": "~0.9.13"
|
"socket.io": "~0.9.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt-contrib-qunit": "~0.2.2",
|
"grunt-contrib-qunit": "~0.2.2",
|
||||||
"grunt-contrib-jshint": "~0.2.0",
|
"grunt-contrib-jshint": "~0.6.4",
|
||||||
"grunt-contrib-cssmin": "~0.4.1",
|
"grunt-contrib-cssmin": "~0.4.1",
|
||||||
"grunt-contrib-uglify": "~0.1.1",
|
"grunt-contrib-uglify": "~0.2.4",
|
||||||
"grunt-contrib-watch": "~0.2.0",
|
"grunt-contrib-watch": "~0.5.3",
|
||||||
"grunt-contrib-sass": "~0.2.2",
|
"grunt-contrib-sass": "~0.5.0",
|
||||||
"grunt-contrib-connect": "~0.2.0",
|
"grunt-contrib-connect": "~0.4.1",
|
||||||
"grunt-zip": "~0.7.0",
|
"grunt-zip": "~0.7.0",
|
||||||
"grunt": "~0.4.0"
|
"grunt": "~0.4.0"
|
||||||
},
|
},
|
||||||
|
|||||||
+96
-47
@@ -3,7 +3,16 @@
|
|||||||
* markdown inside of presentations as well as loading
|
* markdown inside of presentations as well as loading
|
||||||
* of external markdown documents.
|
* of external markdown documents.
|
||||||
*/
|
*/
|
||||||
(function(){
|
(function( root, factory ) {
|
||||||
|
if( typeof exports === 'object' ) {
|
||||||
|
module.exports = factory( require( './marked' ) );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Browser globals (root is window)
|
||||||
|
root.RevealMarkdown = factory( root.marked );
|
||||||
|
root.RevealMarkdown.initialize();
|
||||||
|
}
|
||||||
|
}( this, function( marked ) {
|
||||||
|
|
||||||
if( typeof marked === 'undefined' ) {
|
if( typeof marked === 'undefined' ) {
|
||||||
throw 'The reveal.js Markdown plugin requires marked to be loaded';
|
throw 'The reveal.js Markdown plugin requires marked to be loaded';
|
||||||
@@ -17,6 +26,10 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var DEFAULT_SLIDE_SEPARATOR = '^\n---\n$',
|
||||||
|
DEFAULT_NOTES_SEPARATOR = 'note:';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the markdown contents of a slide section
|
* Retrieves the markdown contents of a slide section
|
||||||
* element. Normalizes leading tabs/whitespace.
|
* element. Normalizes leading tabs/whitespace.
|
||||||
@@ -72,15 +85,32 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inspects the given options and fills out default
|
||||||
|
* values for what's not defined.
|
||||||
|
*/
|
||||||
|
function getSlidifyOptions( options ) {
|
||||||
|
|
||||||
|
options = options || {};
|
||||||
|
options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR;
|
||||||
|
options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR;
|
||||||
|
options.attributes = options.attributes || '';
|
||||||
|
|
||||||
|
return options;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function for constructing a markdown slide.
|
* Helper function for constructing a markdown slide.
|
||||||
*/
|
*/
|
||||||
function createMarkdownSlide( data ) {
|
function createMarkdownSlide( content, options ) {
|
||||||
|
|
||||||
var content = data.content || data;
|
options = getSlidifyOptions( options );
|
||||||
|
|
||||||
if( data.notes ) {
|
var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) );
|
||||||
content += '<aside class="notes" data-markdown>' + data.notes + '</aside>';
|
|
||||||
|
if( notesMatch.length === 2 ) {
|
||||||
|
content = notesMatch[0] + '<aside class="notes" data-markdown>' + notesMatch[1].trim() + '</aside>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<script type="text/template">' + content + '</script>';
|
return '<script type="text/template">' + content + '</script>';
|
||||||
@@ -91,25 +121,18 @@
|
|||||||
* Parses a data string into multiple slides based
|
* Parses a data string into multiple slides based
|
||||||
* on the passed in separator arguments.
|
* on the passed in separator arguments.
|
||||||
*/
|
*/
|
||||||
function slidifyMarkdown( markdown, options ) {
|
function slidify( markdown, options ) {
|
||||||
|
|
||||||
options = options || {};
|
options = getSlidifyOptions( options );
|
||||||
options.separator = options.separator || '^\n---\n$';
|
|
||||||
options.notesSeparator = options.notesSeparator || 'note:';
|
|
||||||
options.attributes = options.attributes || '';
|
|
||||||
|
|
||||||
var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ),
|
var separatorRegex = new RegExp( options.separator + ( options.verticalSeparator ? '|' + options.verticalSeparator : '' ), 'mg' ),
|
||||||
horizontalSeparatorRegex = new RegExp( options.separator ),
|
horizontalSeparatorRegex = new RegExp( options.separator );
|
||||||
notesSeparatorRegex = new RegExp( options.notesSeparator, 'mgi' );
|
|
||||||
|
|
||||||
var matches,
|
var matches,
|
||||||
noteMatch,
|
|
||||||
lastIndex = 0,
|
lastIndex = 0,
|
||||||
isHorizontal,
|
isHorizontal,
|
||||||
wasHorizontal = true,
|
wasHorizontal = true,
|
||||||
content,
|
content,
|
||||||
notes,
|
|
||||||
slide,
|
|
||||||
sectionStack = [];
|
sectionStack = [];
|
||||||
|
|
||||||
// iterate until all blocks between separators are stacked up
|
// iterate until all blocks between separators are stacked up
|
||||||
@@ -126,25 +149,14 @@
|
|||||||
|
|
||||||
// pluck slide content from markdown input
|
// pluck slide content from markdown input
|
||||||
content = markdown.substring( lastIndex, matches.index );
|
content = markdown.substring( lastIndex, matches.index );
|
||||||
noteMatch = content.split( notesSeparatorRegex );
|
|
||||||
|
|
||||||
if( noteMatch.length === 2 ) {
|
|
||||||
content = noteMatch[0];
|
|
||||||
notes = noteMatch[1].trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
slide = {
|
|
||||||
content: content,
|
|
||||||
notes: notes || ''
|
|
||||||
};
|
|
||||||
|
|
||||||
if( isHorizontal && wasHorizontal ) {
|
if( isHorizontal && wasHorizontal ) {
|
||||||
// add to horizontal stack
|
// add to horizontal stack
|
||||||
sectionStack.push( slide );
|
sectionStack.push( content );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// add to vertical stack
|
// add to vertical stack
|
||||||
sectionStack[sectionStack.length-1].push( slide );
|
sectionStack[sectionStack.length-1].push( content );
|
||||||
}
|
}
|
||||||
|
|
||||||
lastIndex = separatorRegex.lastIndex;
|
lastIndex = separatorRegex.lastIndex;
|
||||||
@@ -160,12 +172,16 @@
|
|||||||
for( var i = 0, len = sectionStack.length; i < len; i++ ) {
|
for( var i = 0, len = sectionStack.length; i < len; i++ ) {
|
||||||
// vertical
|
// vertical
|
||||||
if( sectionStack[i].propertyIsEnumerable( length ) && typeof sectionStack[i].splice === 'function' ) {
|
if( sectionStack[i].propertyIsEnumerable( length ) && typeof sectionStack[i].splice === 'function' ) {
|
||||||
markdownSections += '<section '+ options.attributes +'>' +
|
markdownSections += '<section '+ options.attributes +'>';
|
||||||
'<section data-markdown>' + sectionStack[i].map( createMarkdownSlide ).join( '</section><section data-markdown>' ) + '</section>' +
|
|
||||||
'</section>';
|
sectionStack[i].forEach( function( child ) {
|
||||||
|
markdownSections += '<section data-markdown>' + createMarkdownSlide( child, options ) + '</section>';
|
||||||
|
} );
|
||||||
|
|
||||||
|
markdownSections += '</section>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
markdownSections += '<section '+ options.attributes +' data-markdown>' + createMarkdownSlide( sectionStack[i] ) + '</section>';
|
markdownSections += '<section '+ options.attributes +' data-markdown>' + createMarkdownSlide( sectionStack[i], options ) + '</section>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,7 +189,12 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadExternalMarkdown() {
|
/**
|
||||||
|
* Parses any current data-markdown slides, splits
|
||||||
|
* multi-slide markdown into separate sections and
|
||||||
|
* handles loading of external markdown.
|
||||||
|
*/
|
||||||
|
function processSlides() {
|
||||||
|
|
||||||
var sections = document.querySelectorAll( '[data-markdown]'),
|
var sections = document.querySelectorAll( '[data-markdown]'),
|
||||||
section;
|
section;
|
||||||
@@ -198,7 +219,7 @@
|
|||||||
if( xhr.readyState === 4 ) {
|
if( xhr.readyState === 4 ) {
|
||||||
if ( xhr.status >= 200 && xhr.status < 300 ) {
|
if ( xhr.status >= 200 && xhr.status < 300 ) {
|
||||||
|
|
||||||
section.outerHTML = slidifyMarkdown( xhr.responseText, {
|
section.outerHTML = slidify( xhr.responseText, {
|
||||||
separator: section.getAttribute( 'data-separator' ),
|
separator: section.getAttribute( 'data-separator' ),
|
||||||
verticalSeparator: section.getAttribute( 'data-vertical' ),
|
verticalSeparator: section.getAttribute( 'data-vertical' ),
|
||||||
notesSeparator: section.getAttribute( 'data-notes' ),
|
notesSeparator: section.getAttribute( 'data-notes' ),
|
||||||
@@ -228,9 +249,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if( section.getAttribute( 'data-separator' ) ) {
|
else if( section.getAttribute( 'data-separator' ) || section.getAttribute( 'data-vertical' ) || section.getAttribute( 'data-notes' ) ) {
|
||||||
|
|
||||||
section.outerHTML = slidifyMarkdown( getMarkdownFromSlide( section ), {
|
section.outerHTML = slidify( getMarkdownFromSlide( section ), {
|
||||||
separator: section.getAttribute( 'data-separator' ),
|
separator: section.getAttribute( 'data-separator' ),
|
||||||
verticalSeparator: section.getAttribute( 'data-vertical' ),
|
verticalSeparator: section.getAttribute( 'data-vertical' ),
|
||||||
notesSeparator: section.getAttribute( 'data-notes' ),
|
notesSeparator: section.getAttribute( 'data-notes' ),
|
||||||
@@ -238,11 +259,20 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
section.innerHTML = createMarkdownSlide( getMarkdownFromSlide( section ) );
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertMarkdownToHTML() {
|
/**
|
||||||
|
* Converts any current data-markdown slides in the
|
||||||
|
* DOM to HTML.
|
||||||
|
*/
|
||||||
|
function convertSlides() {
|
||||||
|
|
||||||
var sections = document.querySelectorAll( '[data-markdown]');
|
var sections = document.querySelectorAll( '[data-markdown]');
|
||||||
|
|
||||||
@@ -250,22 +280,41 @@
|
|||||||
|
|
||||||
var section = sections[i];
|
var section = sections[i];
|
||||||
|
|
||||||
var notes = section.querySelector( 'aside.notes' );
|
// Only parse the same slide once
|
||||||
var markdown = getMarkdownFromSlide( section );
|
if( !section.getAttribute( 'data-markdown-parsed' ) ) {
|
||||||
|
|
||||||
section.innerHTML = marked( markdown );
|
section.setAttribute( 'data-markdown-parsed', true )
|
||||||
|
|
||||||
|
var notes = section.querySelector( 'aside.notes' );
|
||||||
|
var markdown = getMarkdownFromSlide( section );
|
||||||
|
|
||||||
|
section.innerHTML = marked( markdown );
|
||||||
|
|
||||||
|
// If there were notes, we need to re-add them after
|
||||||
|
// having overwritten the section's HTML
|
||||||
|
if( notes ) {
|
||||||
|
section.appendChild( notes );
|
||||||
|
}
|
||||||
|
|
||||||
// If there were notes, we need to re-add them after
|
|
||||||
// having overwritten the section's HTML
|
|
||||||
if( notes ) {
|
|
||||||
section.appendChild( notes );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadExternalMarkdown();
|
// API
|
||||||
convertMarkdownToHTML();
|
return {
|
||||||
|
|
||||||
})();
|
initialize: function() {
|
||||||
|
processSlides();
|
||||||
|
convertSlides();
|
||||||
|
},
|
||||||
|
|
||||||
|
// TODO: Do these belong in the API?
|
||||||
|
processSlides: processSlides,
|
||||||
|
convertSlides: convertSlides,
|
||||||
|
slidify: slidify
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}));
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
(function() {
|
(function() {
|
||||||
// don't emit events from inside the previews themselves
|
// Don't emit events from inside of notes windows
|
||||||
if ( window.location.search.match( /receiver/gi ) ) { return; }
|
if ( window.location.search.match( /receiver/gi ) ) { return; }
|
||||||
|
|
||||||
var multiplex = Reveal.getConfig().multiplex;
|
var multiplex = Reveal.getConfig().multiplex;
|
||||||
|
|
||||||
var socket = io.connect(multiplex.url);
|
var socket = io.connect(multiplex.url);
|
||||||
|
|||||||
@@ -139,11 +139,11 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="wrap-current-slide" class="slides">
|
<div id="wrap-current-slide" class="slides">
|
||||||
<script>document.write( '<iframe width="1280" height="1024" id="current-slide" src="'+ window.opener.location.href +'"></iframe>' );</script>
|
<script>document.write( '<iframe width="1280" height="1024" id="current-slide" src="'+ window.opener.location.href +'?receiver"></iframe>' );</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="wrap-next-slide" class="slides">
|
<div id="wrap-next-slide" class="slides">
|
||||||
<script>document.write( '<iframe width="640" height="512" id="next-slide" src="'+ window.opener.location.href +'"></iframe>' );</script>
|
<script>document.write( '<iframe width="640" height="512" id="next-slide" src="'+ window.opener.location.href +'?receiver"></iframe>' );</script>
|
||||||
<span>UPCOMING:</span>
|
<span>UPCOMING:</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -239,6 +239,10 @@
|
|||||||
currentSlide.contentWindow.Reveal.addEventListener( 'fragmentshown', synchronizeMainWindow );
|
currentSlide.contentWindow.Reveal.addEventListener( 'fragmentshown', synchronizeMainWindow );
|
||||||
currentSlide.contentWindow.Reveal.addEventListener( 'fragmenthidden', synchronizeMainWindow );
|
currentSlide.contentWindow.Reveal.addEventListener( 'fragmenthidden', synchronizeMainWindow );
|
||||||
|
|
||||||
|
// Reconfigure the notes window to remove needless UI
|
||||||
|
currentSlide.contentWindow.Reveal.configure({ controls: false, progress: false, overview: false });
|
||||||
|
nextSlide.contentWindow.Reveal.configure({ controls: false, progress: false, overview: false });
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
* Detects if notes are enable and the current page is opened inside an /iframe
|
* Detects if notes are enable and the current page is opened inside an /iframe
|
||||||
* this prevents loading Remotes.io several times
|
* this prevents loading Remotes.io several times
|
||||||
*/
|
*/
|
||||||
var remotesAndIsNotes = (function(){
|
var isNotesAndIframe = (function(){
|
||||||
return !(window.RevealNotes && self == top);
|
return window.RevealNotes && !(self == top);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
if(!hasTouch && !remotesAndIsNotes){
|
if(!hasTouch && !isNotesAndIframe){
|
||||||
head.ready( 'remotes.ne.min.js', function() {
|
head.ready( 'remotes.ne.min.js', function() {
|
||||||
new Remotes("preview")
|
new Remotes("preview")
|
||||||
.on("swipe-left", function(e){ Reveal.right(); })
|
.on("swipe-left", function(e){ Reveal.right(); })
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
|
<title>reveal.js - Test Markdown</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../css/reveal.min.css">
|
||||||
|
<link rel="stylesheet" href="qunit-1.12.0.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="overflow: auto;">
|
||||||
|
|
||||||
|
<div id="qunit"></div>
|
||||||
|
<div id="qunit-fixture"></div>
|
||||||
|
|
||||||
|
<div class="reveal" style="display: none;">
|
||||||
|
|
||||||
|
<div class="slides">
|
||||||
|
|
||||||
|
<!-- <section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n"></section> -->
|
||||||
|
|
||||||
|
<!-- Slides are separated by newline + three dashes + newline, vertical slides identical but two dashes -->
|
||||||
|
<section data-markdown data-separator="^\n---\n$" data-vertical="^\n--\n$">
|
||||||
|
<script type="text/template">
|
||||||
|
## Slide 1.1
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
## Slide 1.2
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Slide 2
|
||||||
|
</script>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../lib/js/head.min.js"></script>
|
||||||
|
<script src="../js/reveal.min.js"></script>
|
||||||
|
<script src="../plugin/markdown/marked.js"></script>
|
||||||
|
<script src="../plugin/markdown/markdown.js"></script>
|
||||||
|
<script src="qunit-1.12.0.js"></script>
|
||||||
|
|
||||||
|
<script src="test-markdown.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Reveal.addEventListener( 'ready', function() {
|
||||||
|
|
||||||
|
QUnit.module( 'Markdown' );
|
||||||
|
|
||||||
|
test( 'Vertical separator', function() {
|
||||||
|
strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
|
Reveal.initialize();
|
||||||
|
|
||||||
Reference in new issue
Block a user