mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-17 03:54:16 +02:00
3.7.0
This commit is contained in:
@@ -72,14 +72,7 @@ ul, ol, div, p {
|
|||||||
overflow: visible;
|
overflow: visible;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
-webkit-perspective: none;
|
|
||||||
-moz-perspective: none;
|
|
||||||
-ms-perspective: none;
|
|
||||||
perspective: none;
|
perspective: none;
|
||||||
|
|
||||||
-webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */
|
|
||||||
-moz-perspective-origin: 50% 50%;
|
|
||||||
-ms-perspective-origin: 50% 50%;
|
|
||||||
perspective-origin: 50% 50%;
|
perspective-origin: 50% 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,14 +96,7 @@ ul, ol, div, p {
|
|||||||
|
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
|
|
||||||
-webkit-transform-style: flat !important;
|
|
||||||
-moz-transform-style: flat !important;
|
|
||||||
-ms-transform-style: flat !important;
|
|
||||||
transform-style: flat !important;
|
transform-style: flat !important;
|
||||||
|
|
||||||
-webkit-transform: none !important;
|
|
||||||
-moz-transform: none !important;
|
|
||||||
-ms-transform: none !important;
|
|
||||||
transform: none !important;
|
transform: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
/*!
|
/*!
|
||||||
* reveal.js
|
* reveal.js
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://revealjs.com
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Hakim El Hattab, http://hakim.se
|
* Copyright (C) 2018 Hakim El Hattab, http://hakim.se
|
||||||
*/
|
*/
|
||||||
/*********************************************
|
/*********************************************
|
||||||
* RESET STYLES
|
* RESET STYLES
|
||||||
@@ -127,13 +127,25 @@ body {
|
|||||||
-webkit-transform: translate(0, 0);
|
-webkit-transform: translate(0, 0);
|
||||||
transform: translate(0, 0); }
|
transform: translate(0, 0); }
|
||||||
|
|
||||||
|
.reveal .slides section .fragment.fade-in-then-out,
|
||||||
.reveal .slides section .fragment.current-visible {
|
.reveal .slides section .fragment.current-visible {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
visibility: hidden; }
|
visibility: hidden; }
|
||||||
|
.reveal .slides section .fragment.fade-in-then-out.current-fragment,
|
||||||
.reveal .slides section .fragment.current-visible.current-fragment {
|
.reveal .slides section .fragment.current-visible.current-fragment {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: inherit; }
|
visibility: inherit; }
|
||||||
|
|
||||||
|
.reveal .slides section .fragment.fade-in-then-semi-out {
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden; }
|
||||||
|
.reveal .slides section .fragment.fade-in-then-semi-out.visible {
|
||||||
|
opacity: 0.5;
|
||||||
|
visibility: inherit; }
|
||||||
|
.reveal .slides section .fragment.fade-in-then-semi-out.current-fragment {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: inherit; }
|
||||||
|
|
||||||
.reveal .slides section .fragment.highlight-red,
|
.reveal .slides section .fragment.highlight-red,
|
||||||
.reveal .slides section .fragment.highlight-current-red,
|
.reveal .slides section .fragment.highlight-current-red,
|
||||||
.reveal .slides section .fragment.highlight-green,
|
.reveal .slides section .fragment.highlight-green,
|
||||||
@@ -448,7 +460,7 @@ body {
|
|||||||
* SLIDE NUMBER
|
* SLIDE NUMBER
|
||||||
*********************************************/
|
*********************************************/
|
||||||
.reveal .slide-number {
|
.reveal .slide-number {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
display: block;
|
display: block;
|
||||||
right: 8px;
|
right: 8px;
|
||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
@@ -460,6 +472,9 @@ body {
|
|||||||
background-color: rgba(0, 0, 0, 0.4);
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
padding: 5px; }
|
padding: 5px; }
|
||||||
|
|
||||||
|
.reveal .slide-number a {
|
||||||
|
color: currentColor; }
|
||||||
|
|
||||||
.reveal .slide-number-delimiter {
|
.reveal .slide-number-delimiter {
|
||||||
margin: 0 3px; }
|
margin: 0 3px; }
|
||||||
|
|
||||||
@@ -528,7 +543,8 @@ body {
|
|||||||
|
|
||||||
.reveal .slides > section.stack {
|
.reveal .slides > section.stack {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0; }
|
padding-bottom: 0;
|
||||||
|
pointer-events: none; }
|
||||||
|
|
||||||
.reveal .slides > section.present,
|
.reveal .slides > section.present,
|
||||||
.reveal .slides > section > section.present {
|
.reveal .slides > section > section.present {
|
||||||
@@ -948,6 +964,21 @@ body {
|
|||||||
z-index: 100;
|
z-index: 100;
|
||||||
transition: all 1s ease; }
|
transition: all 1s ease; }
|
||||||
|
|
||||||
|
.reveal .pause-overlay .resume-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
color: #ccc;
|
||||||
|
border-radius: 2px;
|
||||||
|
padding: 6px 14px;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
background: transparent;
|
||||||
|
cursor: pointer; }
|
||||||
|
.reveal .pause-overlay .resume-button:hover {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #fff; }
|
||||||
|
|
||||||
.reveal.paused .pause-overlay {
|
.reveal.paused .pause-overlay {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1; }
|
opacity: 1; }
|
||||||
@@ -1011,10 +1042,15 @@ body {
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
transition: all 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
.reveal .slide-background-content {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
background-position: 50% 50%;
|
background-position: 50% 50%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover; }
|
||||||
transition: all 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
|
||||||
|
|
||||||
.reveal .slide-background.stack {
|
.reveal .slide-background.stack {
|
||||||
display: block; }
|
display: block; }
|
||||||
|
7
css/reveal.min.css
vendored
Normal file
7
css/reveal.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
|||||||
/*!
|
/*!
|
||||||
* reveal.js
|
* reveal.js
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://revealjs.com
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Hakim El Hattab, http://hakim.se
|
* Copyright (C) 2018 Hakim El Hattab, http://hakim.se
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -160,6 +160,7 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reveal .slides section .fragment.fade-in-then-out,
|
||||||
.reveal .slides section .fragment.current-visible {
|
.reveal .slides section .fragment.current-visible {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
@@ -170,6 +171,21 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reveal .slides section .fragment.fade-in-then-semi-out {
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
|
||||||
|
&.visible {
|
||||||
|
opacity: 0.5;
|
||||||
|
visibility: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.current-fragment {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.reveal .slides section .fragment.highlight-red,
|
.reveal .slides section .fragment.highlight-red,
|
||||||
.reveal .slides section .fragment.highlight-current-red,
|
.reveal .slides section .fragment.highlight-current-red,
|
||||||
.reveal .slides section .fragment.highlight-green,
|
.reveal .slides section .fragment.highlight-green,
|
||||||
@@ -540,7 +556,7 @@ $controlsArrowAngleActive: 36deg;
|
|||||||
*********************************************/
|
*********************************************/
|
||||||
|
|
||||||
.reveal .slide-number {
|
.reveal .slide-number {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
display: block;
|
display: block;
|
||||||
right: 8px;
|
right: 8px;
|
||||||
bottom: 8px;
|
bottom: 8px;
|
||||||
@@ -553,6 +569,10 @@ $controlsArrowAngleActive: 36deg;
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reveal .slide-number a {
|
||||||
|
color: currentColor;
|
||||||
|
}
|
||||||
|
|
||||||
.reveal .slide-number-delimiter {
|
.reveal .slide-number-delimiter {
|
||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
}
|
}
|
||||||
@@ -636,6 +656,7 @@ $controlsArrowAngleActive: 36deg;
|
|||||||
.reveal .slides>section.stack {
|
.reveal .slides>section.stack {
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reveal .slides>section.present,
|
.reveal .slides>section.present,
|
||||||
@@ -1013,6 +1034,25 @@ $controlsArrowAngleActive: 36deg;
|
|||||||
z-index: 100;
|
z-index: 100;
|
||||||
transition: all 1s ease;
|
transition: all 1s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reveal .pause-overlay .resume-button {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
color: #ccc;
|
||||||
|
border-radius: 2px;
|
||||||
|
padding: 6px 14px;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
background: transparent;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: #fff;
|
||||||
|
border-color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.reveal.paused .pause-overlay {
|
.reveal.paused .pause-overlay {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -1086,11 +1126,18 @@ $controlsArrowAngleActive: 36deg;
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
background-color: rgba( 0, 0, 0, 0 );
|
background-color: rgba( 0, 0, 0, 0 );
|
||||||
|
|
||||||
|
transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal .slide-background-content {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
background-position: 50% 50%;
|
background-position: 50% 50%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
||||||
transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.reveal .slide-background.stack {
|
.reveal .slide-background.stack {
|
||||||
|
@@ -4,7 +4,7 @@ Themes are written using Sass to keep things modular and reduce the need for rep
|
|||||||
|
|
||||||
## Creating a Theme
|
## Creating a Theme
|
||||||
|
|
||||||
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`.
|
To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `npm run build -- css-themes`.
|
||||||
|
|
||||||
Each theme file does four things in the following order:
|
Each theme file does four things in the following order:
|
||||||
|
|
||||||
|
@@ -34,8 +34,8 @@ body {
|
|||||||
background: rgba(79, 64, 28, 0.99);
|
background: rgba(79, 64, 28, 0.99);
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -193,10 +193,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -266,3 +268,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #f7f3de; } }
|
||||||
|
@@ -30,8 +30,8 @@ body {
|
|||||||
background: #bee4fd;
|
background: #bee4fd;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -189,10 +189,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -262,3 +264,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #222; } }
|
||||||
|
@@ -33,8 +33,8 @@ body {
|
|||||||
background: #a23;
|
background: #a23;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -192,10 +192,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -266,6 +268,13 @@ body {
|
|||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #222; } }
|
||||||
|
|
||||||
.reveal p {
|
.reveal p {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
text-shadow: 1px 1px #222; }
|
text-shadow: 1px 1px #222; }
|
||||||
|
@@ -36,8 +36,8 @@ body {
|
|||||||
background: #FF5E99;
|
background: #FF5E99;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -195,10 +195,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -268,3 +270,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #2b2b2b; } }
|
||||||
|
@@ -34,8 +34,8 @@ body {
|
|||||||
background: #d33682;
|
background: #d33682;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -193,10 +193,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -266,3 +268,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #002b36; } }
|
||||||
|
@@ -28,8 +28,8 @@ body {
|
|||||||
background: #e7ad52;
|
background: #e7ad52;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -187,10 +187,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -260,3 +262,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #111; } }
|
||||||
|
@@ -30,8 +30,8 @@ body {
|
|||||||
background: #26351C;
|
background: #26351C;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -189,10 +189,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -262,3 +264,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #F0F1EB; } }
|
||||||
|
@@ -33,8 +33,8 @@ body {
|
|||||||
background: rgba(0, 0, 0, 0.99);
|
background: rgba(0, 0, 0, 0.99);
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -192,10 +192,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -265,3 +267,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #fff; } }
|
||||||
|
@@ -37,8 +37,8 @@ body {
|
|||||||
background: #134674;
|
background: #134674;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -196,10 +196,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -269,3 +271,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #f7fbfc; } }
|
||||||
|
@@ -34,8 +34,8 @@ body {
|
|||||||
background: #d33682;
|
background: #d33682;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -193,10 +193,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -266,3 +268,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #fdf6e3; } }
|
||||||
|
@@ -28,8 +28,8 @@ body {
|
|||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reveal .slides>section,
|
.reveal .slides section,
|
||||||
.reveal .slides>section>section {
|
.reveal .slides section>section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit;
|
font-weight: inherit;
|
||||||
}
|
}
|
||||||
@@ -217,9 +217,11 @@ body {
|
|||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super;
|
vertical-align: super;
|
||||||
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub;
|
vertical-align: sub;
|
||||||
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
@@ -313,4 +315,11 @@ body {
|
|||||||
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: $backgroundColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -30,8 +30,8 @@ body {
|
|||||||
background: #98bdef;
|
background: #98bdef;
|
||||||
text-shadow: none; }
|
text-shadow: none; }
|
||||||
|
|
||||||
.reveal .slides > section,
|
.reveal .slides section,
|
||||||
.reveal .slides > section > section {
|
.reveal .slides section > section {
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
font-weight: inherit; }
|
font-weight: inherit; }
|
||||||
|
|
||||||
@@ -189,10 +189,12 @@ body {
|
|||||||
border-bottom: none; }
|
border-bottom: none; }
|
||||||
|
|
||||||
.reveal sup {
|
.reveal sup {
|
||||||
vertical-align: super; }
|
vertical-align: super;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal sub {
|
.reveal sub {
|
||||||
vertical-align: sub; }
|
vertical-align: sub;
|
||||||
|
font-size: smaller; }
|
||||||
|
|
||||||
.reveal small {
|
.reveal small {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -262,3 +264,10 @@ body {
|
|||||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||||
|
|
||||||
|
/*********************************************
|
||||||
|
* PRINT BACKGROUND
|
||||||
|
*********************************************/
|
||||||
|
@media print {
|
||||||
|
.backgrounds {
|
||||||
|
background-color: #fff; } }
|
||||||
|
564
js/reveal.js
564
js/reveal.js
@@ -1,9 +1,9 @@
|
|||||||
/*!
|
/*!
|
||||||
* reveal.js
|
* reveal.js
|
||||||
* http://lab.hakim.se/reveal-js
|
* http://revealjs.com
|
||||||
* MIT licensed
|
* MIT licensed
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Hakim El Hattab, http://hakim.se
|
* Copyright (C) 2018 Hakim El Hattab, http://hakim.se
|
||||||
*/
|
*/
|
||||||
(function( root, factory ) {
|
(function( root, factory ) {
|
||||||
if( typeof define === 'function' && define.amd ) {
|
if( typeof define === 'function' && define.amd ) {
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
var Reveal;
|
var Reveal;
|
||||||
|
|
||||||
// The reveal.js version
|
// The reveal.js version
|
||||||
var VERSION = '3.6.0';
|
var VERSION = '3.7.0';
|
||||||
|
|
||||||
var SLIDES_SELECTOR = '.slides section',
|
var SLIDES_SELECTOR = '.slides section',
|
||||||
HORIZONTAL_SLIDES_SELECTOR = '.slides>section',
|
HORIZONTAL_SLIDES_SELECTOR = '.slides>section',
|
||||||
@@ -69,6 +69,10 @@
|
|||||||
// Display the page number of the current slide
|
// Display the page number of the current slide
|
||||||
slideNumber: false,
|
slideNumber: false,
|
||||||
|
|
||||||
|
// Use 1 based indexing for # links to match slide number (default is zero
|
||||||
|
// based)
|
||||||
|
hashOneBasedIndex: false,
|
||||||
|
|
||||||
// Determine which displays to show the slide number on
|
// Determine which displays to show the slide number on
|
||||||
showSlideNumber: 'all',
|
showSlideNumber: 'all',
|
||||||
|
|
||||||
@@ -84,6 +88,10 @@
|
|||||||
// Enable the slide overview mode
|
// Enable the slide overview mode
|
||||||
overview: true,
|
overview: true,
|
||||||
|
|
||||||
|
// Disables the default reveal.js slide layout so that you can use
|
||||||
|
// custom CSS layout
|
||||||
|
disableLayout: false,
|
||||||
|
|
||||||
// Vertical centering of slides
|
// Vertical centering of slides
|
||||||
center: true,
|
center: true,
|
||||||
|
|
||||||
@@ -102,6 +110,10 @@
|
|||||||
// Turns fragments on and off globally
|
// Turns fragments on and off globally
|
||||||
fragments: true,
|
fragments: true,
|
||||||
|
|
||||||
|
// Flags whether to include the current fragment in the URL,
|
||||||
|
// so that reloading brings you to the same fragment position
|
||||||
|
fragmentInURL: false,
|
||||||
|
|
||||||
// Flags if the presentation is running in an embedded mode,
|
// Flags if the presentation is running in an embedded mode,
|
||||||
// i.e. contained within a limited portion of the screen
|
// i.e. contained within a limited portion of the screen
|
||||||
embedded: false,
|
embedded: false,
|
||||||
@@ -135,6 +147,11 @@
|
|||||||
// Use this method for navigation when auto-sliding (defaults to navigateNext)
|
// Use this method for navigation when auto-sliding (defaults to navigateNext)
|
||||||
autoSlideMethod: null,
|
autoSlideMethod: null,
|
||||||
|
|
||||||
|
// Specify the average time in seconds that you think you will spend
|
||||||
|
// presenting each slide. This is used to show a pacing timer in the
|
||||||
|
// speaker view
|
||||||
|
defaultTiming: null,
|
||||||
|
|
||||||
// Enable slide navigation via mouse wheel
|
// Enable slide navigation via mouse wheel
|
||||||
mouseWheel: false,
|
mouseWheel: false,
|
||||||
|
|
||||||
@@ -145,6 +162,8 @@
|
|||||||
hideAddressBar: true,
|
hideAddressBar: true,
|
||||||
|
|
||||||
// Opens links in an iframe preview overlay
|
// Opens links in an iframe preview overlay
|
||||||
|
// Add `data-preview-link` and `data-preview-link="false"` to customise each link
|
||||||
|
// individually
|
||||||
previewLinks: false,
|
previewLinks: false,
|
||||||
|
|
||||||
// Exposes the reveal.js API through window.postMessage
|
// Exposes the reveal.js API through window.postMessage
|
||||||
@@ -171,6 +190,12 @@
|
|||||||
// Parallax background size
|
// Parallax background size
|
||||||
parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px"
|
parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px"
|
||||||
|
|
||||||
|
// Parallax background repeat
|
||||||
|
parallaxBackgroundRepeat: '', // repeat/repeat-x/repeat-y/no-repeat/initial/inherit
|
||||||
|
|
||||||
|
// Parallax background position
|
||||||
|
parallaxBackgroundPosition: '', // CSS syntax, e.g. "top left"
|
||||||
|
|
||||||
// Amount of pixels to move the parallax background per slide step
|
// Amount of pixels to move the parallax background per slide step
|
||||||
parallaxBackgroundHorizontal: null,
|
parallaxBackgroundHorizontal: null,
|
||||||
parallaxBackgroundVertical: null,
|
parallaxBackgroundVertical: null,
|
||||||
@@ -179,6 +204,9 @@
|
|||||||
// to PDF, unlimited by default
|
// to PDF, unlimited by default
|
||||||
pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
|
pdfMaxPagesPerSlide: Number.POSITIVE_INFINITY,
|
||||||
|
|
||||||
|
// Prints each fragment on a separate slide
|
||||||
|
pdfSeparateFragments: true,
|
||||||
|
|
||||||
// Offset used to reduce the height of content within exported PDF pages.
|
// Offset used to reduce the height of content within exported PDF pages.
|
||||||
// This exists to account for environment differences based on how you
|
// This exists to account for environment differences based on how you
|
||||||
// print to PDF. CLI printing options, like phantomjs and wkpdf, can end
|
// print to PDF. CLI printing options, like phantomjs and wkpdf, can end
|
||||||
@@ -289,7 +317,10 @@
|
|||||||
'B , .': 'Pause',
|
'B , .': 'Pause',
|
||||||
'F': 'Fullscreen',
|
'F': 'Fullscreen',
|
||||||
'ESC, O': 'Slide overview'
|
'ESC, O': 'Slide overview'
|
||||||
};
|
},
|
||||||
|
|
||||||
|
// Holds custom key code mappings
|
||||||
|
registeredKeyBindings = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts up the presentation if the client is capable.
|
* Starts up the presentation if the client is capable.
|
||||||
@@ -415,7 +446,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function loadScript( s ) {
|
function loadScript( s ) {
|
||||||
head.ready( s.src.match( /([\w\d_\-]*)\.?js$|[^\\\/]*$/i )[0], function() {
|
head.ready( s.src.match( /([\w\d_\-]*)\.?js(\?[\w\d.=&]*)?$|[^\\\/]*$/i )[0], function() {
|
||||||
// Extension may contain callback functions
|
// Extension may contain callback functions
|
||||||
if( typeof s.callback === 'function' ) {
|
if( typeof s.callback === 'function' ) {
|
||||||
s.callback.apply( this );
|
s.callback.apply( this );
|
||||||
@@ -562,7 +593,8 @@
|
|||||||
dom.speakerNotes.setAttribute( 'tabindex', '0' );
|
dom.speakerNotes.setAttribute( 'tabindex', '0' );
|
||||||
|
|
||||||
// Overlay graphic which is displayed during the paused mode
|
// Overlay graphic which is displayed during the paused mode
|
||||||
createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null );
|
dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', '<button class="resume-button">Resume presentation</button>' );
|
||||||
|
dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' );
|
||||||
|
|
||||||
dom.wrapper.setAttribute( 'role', 'application' );
|
dom.wrapper.setAttribute( 'role', 'application' );
|
||||||
|
|
||||||
@@ -759,14 +791,59 @@
|
|||||||
numberElement.innerHTML = formatSlideNumber( slideNumberH, '.', slideNumberV );
|
numberElement.innerHTML = formatSlideNumber( slideNumberH, '.', slideNumberV );
|
||||||
page.appendChild( numberElement );
|
page.appendChild( numberElement );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy page and show fragments one after another
|
||||||
|
if( config.pdfSeparateFragments ) {
|
||||||
|
|
||||||
|
// Each fragment 'group' is an array containing one or more
|
||||||
|
// fragments. Multiple fragments that appear at the same time
|
||||||
|
// are part of the same group.
|
||||||
|
var fragmentGroups = sortFragments( page.querySelectorAll( '.fragment' ), true );
|
||||||
|
|
||||||
|
var previousFragmentStep;
|
||||||
|
var previousPage;
|
||||||
|
|
||||||
|
fragmentGroups.forEach( function( fragments ) {
|
||||||
|
|
||||||
|
// Remove 'current-fragment' from the previous group
|
||||||
|
if( previousFragmentStep ) {
|
||||||
|
previousFragmentStep.forEach( function( fragment ) {
|
||||||
|
fragment.classList.remove( 'current-fragment' );
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show the fragments for the current index
|
||||||
|
fragments.forEach( function( fragment ) {
|
||||||
|
fragment.classList.add( 'visible', 'current-fragment' );
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Create a separate page for the current fragment state
|
||||||
|
var clonedPage = page.cloneNode( true );
|
||||||
|
page.parentNode.insertBefore( clonedPage, ( previousPage || page ).nextSibling );
|
||||||
|
|
||||||
|
previousFragmentStep = fragments;
|
||||||
|
previousPage = clonedPage;
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// Reset the first/original page so that all fragments are hidden
|
||||||
|
fragmentGroups.forEach( function( fragments ) {
|
||||||
|
fragments.forEach( function( fragment ) {
|
||||||
|
fragment.classList.remove( 'visible', 'current-fragment' );
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
}
|
||||||
// Show all fragments
|
// Show all fragments
|
||||||
toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' .fragment' ) ).forEach( function( fragment ) {
|
else {
|
||||||
|
toArray( page.querySelectorAll( '.fragment:not(.fade-out)' ) ).forEach( function( fragment ) {
|
||||||
fragment.classList.add( 'visible' );
|
fragment.classList.add( 'visible' );
|
||||||
} );
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
} );
|
||||||
|
|
||||||
// Notify subscribers that the PDF layout is good to go
|
// Notify subscribers that the PDF layout is good to go
|
||||||
dispatchEvent( 'pdf-ready' );
|
dispatchEvent( 'pdf-ready' );
|
||||||
@@ -865,6 +942,8 @@
|
|||||||
|
|
||||||
dom.background.style.backgroundImage = 'url("' + config.parallaxBackgroundImage + '")';
|
dom.background.style.backgroundImage = 'url("' + config.parallaxBackgroundImage + '")';
|
||||||
dom.background.style.backgroundSize = config.parallaxBackgroundSize;
|
dom.background.style.backgroundSize = config.parallaxBackgroundSize;
|
||||||
|
dom.background.style.backgroundRepeat = config.parallaxBackgroundRepeat;
|
||||||
|
dom.background.style.backgroundPosition = config.parallaxBackgroundPosition;
|
||||||
|
|
||||||
// Make sure the below properties are set on the element - these properties are
|
// Make sure the below properties are set on the element - these properties are
|
||||||
// needed for proper transitions to be set on the element via CSS. To remove
|
// needed for proper transitions to be set on the element via CSS. To remove
|
||||||
@@ -894,6 +973,57 @@
|
|||||||
*/
|
*/
|
||||||
function createBackground( slide, container ) {
|
function createBackground( slide, container ) {
|
||||||
|
|
||||||
|
|
||||||
|
// Main slide background element
|
||||||
|
var element = document.createElement( 'div' );
|
||||||
|
element.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' );
|
||||||
|
|
||||||
|
// Inner background element that wraps images/videos/iframes
|
||||||
|
var contentElement = document.createElement( 'div' );
|
||||||
|
contentElement.className = 'slide-background-content';
|
||||||
|
|
||||||
|
element.appendChild( contentElement );
|
||||||
|
container.appendChild( element );
|
||||||
|
|
||||||
|
slide.slideBackgroundElement = element;
|
||||||
|
slide.slideBackgroundContentElement = contentElement;
|
||||||
|
|
||||||
|
// Syncs the background to reflect all current background settings
|
||||||
|
syncBackground( slide );
|
||||||
|
|
||||||
|
return element;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders all of the visual properties of a slide background
|
||||||
|
* based on the various background attributes.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide
|
||||||
|
*/
|
||||||
|
function syncBackground( slide ) {
|
||||||
|
|
||||||
|
var element = slide.slideBackgroundElement,
|
||||||
|
contentElement = slide.slideBackgroundContentElement;
|
||||||
|
|
||||||
|
// Reset the prior background state in case this is not the
|
||||||
|
// initial sync
|
||||||
|
slide.classList.remove( 'has-dark-background' );
|
||||||
|
slide.classList.remove( 'has-light-background' );
|
||||||
|
|
||||||
|
element.removeAttribute( 'data-loaded' );
|
||||||
|
element.removeAttribute( 'data-background-hash' );
|
||||||
|
element.removeAttribute( 'data-background-size' );
|
||||||
|
element.removeAttribute( 'data-background-transition' );
|
||||||
|
element.style.backgroundColor = '';
|
||||||
|
|
||||||
|
contentElement.style.backgroundSize = '';
|
||||||
|
contentElement.style.backgroundRepeat = '';
|
||||||
|
contentElement.style.backgroundPosition = '';
|
||||||
|
contentElement.style.backgroundImage = '';
|
||||||
|
contentElement.style.opacity = '';
|
||||||
|
contentElement.innerHTML = '';
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
background: slide.getAttribute( 'data-background' ),
|
background: slide.getAttribute( 'data-background' ),
|
||||||
backgroundSize: slide.getAttribute( 'data-background-size' ),
|
backgroundSize: slide.getAttribute( 'data-background-size' ),
|
||||||
@@ -903,17 +1033,13 @@
|
|||||||
backgroundColor: slide.getAttribute( 'data-background-color' ),
|
backgroundColor: slide.getAttribute( 'data-background-color' ),
|
||||||
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
|
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
|
||||||
backgroundPosition: slide.getAttribute( 'data-background-position' ),
|
backgroundPosition: slide.getAttribute( 'data-background-position' ),
|
||||||
backgroundTransition: slide.getAttribute( 'data-background-transition' )
|
backgroundTransition: slide.getAttribute( 'data-background-transition' ),
|
||||||
|
backgroundOpacity: slide.getAttribute( 'data-background-opacity' )
|
||||||
};
|
};
|
||||||
|
|
||||||
var element = document.createElement( 'div' );
|
|
||||||
|
|
||||||
// Carry over custom classes from the slide to the background
|
|
||||||
element.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' );
|
|
||||||
|
|
||||||
if( data.background ) {
|
if( data.background ) {
|
||||||
// Auto-wrap image urls in url(...)
|
// Auto-wrap image urls in url(...)
|
||||||
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#]|$)/gi.test( data.background ) ) {
|
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test( data.background ) ) {
|
||||||
slide.setAttribute( 'data-background-image', data.background );
|
slide.setAttribute( 'data-background-image', data.background );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -933,24 +1059,20 @@
|
|||||||
data.backgroundColor +
|
data.backgroundColor +
|
||||||
data.backgroundRepeat +
|
data.backgroundRepeat +
|
||||||
data.backgroundPosition +
|
data.backgroundPosition +
|
||||||
data.backgroundTransition );
|
data.backgroundTransition +
|
||||||
|
data.backgroundOpacity );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional and optional background properties
|
// Additional and optional background properties
|
||||||
if( data.backgroundSize ) element.style.backgroundSize = data.backgroundSize;
|
|
||||||
if( data.backgroundSize ) element.setAttribute( 'data-background-size', data.backgroundSize );
|
if( data.backgroundSize ) element.setAttribute( 'data-background-size', data.backgroundSize );
|
||||||
if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;
|
if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;
|
||||||
if( data.backgroundRepeat ) element.style.backgroundRepeat = data.backgroundRepeat;
|
|
||||||
if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition;
|
|
||||||
if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );
|
if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );
|
||||||
|
|
||||||
container.appendChild( element );
|
// Background image options are set on the content wrapper
|
||||||
|
if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize;
|
||||||
// If backgrounds are being recreated, clear old classes
|
if( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat;
|
||||||
slide.classList.remove( 'has-dark-background' );
|
if( data.backgroundPosition ) contentElement.style.backgroundPosition = data.backgroundPosition;
|
||||||
slide.classList.remove( 'has-light-background' );
|
if( data.backgroundOpacity ) contentElement.style.opacity = data.backgroundOpacity;
|
||||||
|
|
||||||
slide.slideBackgroundElement = element;
|
|
||||||
|
|
||||||
// If this slide has a background color, add a class that
|
// If this slide has a background color, add a class that
|
||||||
// signals if it is light or dark. If the slide has no background
|
// signals if it is light or dark. If the slide has no background
|
||||||
@@ -972,8 +1094,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return element;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1150,13 +1270,8 @@
|
|||||||
window.addEventListener( 'resize', onWindowResize, false );
|
window.addEventListener( 'resize', onWindowResize, false );
|
||||||
|
|
||||||
if( config.touch ) {
|
if( config.touch ) {
|
||||||
dom.wrapper.addEventListener( 'touchstart', onTouchStart, false );
|
if( 'onpointerdown' in window ) {
|
||||||
dom.wrapper.addEventListener( 'touchmove', onTouchMove, false );
|
// Use W3C pointer events
|
||||||
dom.wrapper.addEventListener( 'touchend', onTouchEnd, false );
|
|
||||||
|
|
||||||
// Support pointer-style touch interaction as well
|
|
||||||
if( window.navigator.pointerEnabled ) {
|
|
||||||
// IE 11 uses un-prefixed version of pointer events
|
|
||||||
dom.wrapper.addEventListener( 'pointerdown', onPointerDown, false );
|
dom.wrapper.addEventListener( 'pointerdown', onPointerDown, false );
|
||||||
dom.wrapper.addEventListener( 'pointermove', onPointerMove, false );
|
dom.wrapper.addEventListener( 'pointermove', onPointerMove, false );
|
||||||
dom.wrapper.addEventListener( 'pointerup', onPointerUp, false );
|
dom.wrapper.addEventListener( 'pointerup', onPointerUp, false );
|
||||||
@@ -1167,6 +1282,12 @@
|
|||||||
dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, false );
|
dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, false );
|
||||||
dom.wrapper.addEventListener( 'MSPointerUp', onPointerUp, false );
|
dom.wrapper.addEventListener( 'MSPointerUp', onPointerUp, false );
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
// Fall back to touch events
|
||||||
|
dom.wrapper.addEventListener( 'touchstart', onTouchStart, false );
|
||||||
|
dom.wrapper.addEventListener( 'touchmove', onTouchMove, false );
|
||||||
|
dom.wrapper.addEventListener( 'touchend', onTouchEnd, false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( config.keyboard ) {
|
if( config.keyboard ) {
|
||||||
@@ -1178,6 +1299,8 @@
|
|||||||
dom.progress.addEventListener( 'click', onProgressClicked, false );
|
dom.progress.addEventListener( 'click', onProgressClicked, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dom.resumeButton.addEventListener( 'click', resume, false );
|
||||||
|
|
||||||
if( config.focusBodyOnPageVisibilityChange ) {
|
if( config.focusBodyOnPageVisibilityChange ) {
|
||||||
var visibilityChange;
|
var visibilityChange;
|
||||||
|
|
||||||
@@ -1229,22 +1352,19 @@
|
|||||||
window.removeEventListener( 'hashchange', onWindowHashChange, false );
|
window.removeEventListener( 'hashchange', onWindowHashChange, false );
|
||||||
window.removeEventListener( 'resize', onWindowResize, false );
|
window.removeEventListener( 'resize', onWindowResize, false );
|
||||||
|
|
||||||
|
dom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false );
|
||||||
|
dom.wrapper.removeEventListener( 'pointermove', onPointerMove, false );
|
||||||
|
dom.wrapper.removeEventListener( 'pointerup', onPointerUp, false );
|
||||||
|
|
||||||
|
dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );
|
||||||
|
dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );
|
||||||
|
dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );
|
||||||
|
|
||||||
dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );
|
dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );
|
||||||
dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );
|
dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );
|
||||||
dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );
|
dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );
|
||||||
|
|
||||||
// IE11
|
dom.resumeButton.removeEventListener( 'click', resume, false );
|
||||||
if( window.navigator.pointerEnabled ) {
|
|
||||||
dom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false );
|
|
||||||
dom.wrapper.removeEventListener( 'pointermove', onPointerMove, false );
|
|
||||||
dom.wrapper.removeEventListener( 'pointerup', onPointerUp, false );
|
|
||||||
}
|
|
||||||
// IE10
|
|
||||||
else if( window.navigator.msPointerEnabled ) {
|
|
||||||
dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );
|
|
||||||
dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );
|
|
||||||
dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( config.progress && dom.progress ) {
|
if ( config.progress && dom.progress ) {
|
||||||
dom.progress.removeEventListener( 'click', onProgressClicked, false );
|
dom.progress.removeEventListener( 'click', onProgressClicked, false );
|
||||||
@@ -1261,6 +1381,38 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a custom key binding with optional description to
|
||||||
|
* be added to the help screen.
|
||||||
|
*/
|
||||||
|
function addKeyBinding( binding, callback ) {
|
||||||
|
|
||||||
|
if( typeof binding === 'object' && binding.keyCode ) {
|
||||||
|
registeredKeyBindings[binding.keyCode] = {
|
||||||
|
callback: callback,
|
||||||
|
key: binding.key,
|
||||||
|
description: binding.description
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
registeredKeyBindings[binding] = {
|
||||||
|
callback: callback,
|
||||||
|
key: null,
|
||||||
|
description: null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the specified custom key binding.
|
||||||
|
*/
|
||||||
|
function removeKeyBinding( keyCode ) {
|
||||||
|
|
||||||
|
delete registeredKeyBindings[keyCode];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend object a with the properties of object b.
|
* Extend object a with the properties of object b.
|
||||||
* If there's a conflict, object b takes precedence.
|
* If there's a conflict, object b takes precedence.
|
||||||
@@ -1538,6 +1690,15 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if this instance is being used to print a PDF with fragments.
|
||||||
|
*/
|
||||||
|
function isPrintingPDFFragments() {
|
||||||
|
|
||||||
|
return ( /print-pdf-fragments/gi ).test( window.location.search );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides the address bar if we're on a mobile device.
|
* Hides the address bar if we're on a mobile device.
|
||||||
*/
|
*/
|
||||||
@@ -1748,6 +1909,13 @@
|
|||||||
html += '<tr><td>' + key + '</td><td>' + keyboardShortcuts[ key ] + '</td></tr>';
|
html += '<tr><td>' + key + '</td><td>' + keyboardShortcuts[ key ] + '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add custom key bindings that have associated descriptions
|
||||||
|
for( var binding in registeredKeyBindings ) {
|
||||||
|
if( registeredKeyBindings[binding].key && registeredKeyBindings[binding].description ) {
|
||||||
|
html += '<tr><td>' + registeredKeyBindings[binding].key + '</td><td>' + registeredKeyBindings[binding].description + '</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
html += '</table>';
|
html += '</table>';
|
||||||
|
|
||||||
dom.overlay.innerHTML = [
|
dom.overlay.innerHTML = [
|
||||||
@@ -1792,6 +1960,8 @@
|
|||||||
|
|
||||||
if( dom.wrapper && !isPrintingPDF() ) {
|
if( dom.wrapper && !isPrintingPDF() ) {
|
||||||
|
|
||||||
|
if( !config.disableLayout ) {
|
||||||
|
|
||||||
var size = getComputedSlideSize();
|
var size = getComputedSlideSize();
|
||||||
|
|
||||||
// Layout the contents of the slides
|
// Layout the contents of the slides
|
||||||
@@ -1866,6 +2036,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
updateProgress();
|
updateProgress();
|
||||||
updateParallax();
|
updateParallax();
|
||||||
|
|
||||||
@@ -2187,6 +2359,41 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a hash URL that will resolve to the current slide location.
|
||||||
|
*/
|
||||||
|
function locationHash() {
|
||||||
|
|
||||||
|
var url = '/';
|
||||||
|
|
||||||
|
// Attempt to create a named link based on the slide's ID
|
||||||
|
var id = currentSlide ? currentSlide.getAttribute( 'id' ) : null;
|
||||||
|
if( id ) {
|
||||||
|
id = encodeURIComponent( id );
|
||||||
|
}
|
||||||
|
|
||||||
|
var indexf;
|
||||||
|
if( config.fragmentInURL ) {
|
||||||
|
indexf = getIndices().f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If the current slide has an ID, use that as a named link,
|
||||||
|
// but we don't support named links with a fragment index
|
||||||
|
if( typeof id === 'string' && id.length && indexf === undefined ) {
|
||||||
|
url = '/' + id;
|
||||||
|
}
|
||||||
|
// Otherwise use the /h/v index
|
||||||
|
else {
|
||||||
|
var hashIndexBase = config.hashOneBasedIndex ? 1 : 0;
|
||||||
|
if( indexh > 0 || indexv > 0 || indexf !== undefined ) url += indexh + hashIndexBase;
|
||||||
|
if( indexv > 0 || indexf !== undefined ) url += '/' + (indexv + hashIndexBase );
|
||||||
|
if( indexf !== undefined ) url += '/' + indexf;
|
||||||
|
}
|
||||||
|
|
||||||
|
return url;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the current or specified slide is vertical
|
* Checks if the current or specified slide is vertical
|
||||||
* (nested within another slide).
|
* (nested within another slide).
|
||||||
@@ -2411,16 +2618,7 @@
|
|||||||
|
|
||||||
// Dispatch an event if the slide changed
|
// Dispatch an event if the slide changed
|
||||||
var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore );
|
var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore );
|
||||||
if( slideChanged ) {
|
if (!slideChanged) {
|
||||||
dispatchEvent( 'slidechanged', {
|
|
||||||
'indexh': indexh,
|
|
||||||
'indexv': indexv,
|
|
||||||
'previousSlide': previousSlide,
|
|
||||||
'currentSlide': currentSlide,
|
|
||||||
'origin': o
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Ensure that the previous slide is never the same as the current
|
// Ensure that the previous slide is never the same as the current
|
||||||
previousSlide = null;
|
previousSlide = null;
|
||||||
}
|
}
|
||||||
@@ -2428,7 +2626,7 @@
|
|||||||
// Solves an edge case where the previous slide maintains the
|
// Solves an edge case where the previous slide maintains the
|
||||||
// 'present' class when navigating between adjacent vertical
|
// 'present' class when navigating between adjacent vertical
|
||||||
// stacks
|
// stacks
|
||||||
if( previousSlide ) {
|
if( previousSlide && previousSlide !== currentSlide ) {
|
||||||
previousSlide.classList.remove( 'present' );
|
previousSlide.classList.remove( 'present' );
|
||||||
previousSlide.setAttribute( 'aria-hidden', 'true' );
|
previousSlide.setAttribute( 'aria-hidden', 'true' );
|
||||||
|
|
||||||
@@ -2448,6 +2646,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( slideChanged ) {
|
||||||
|
dispatchEvent( 'slidechanged', {
|
||||||
|
'indexh': indexh,
|
||||||
|
'indexv': indexv,
|
||||||
|
'previousSlide': previousSlide,
|
||||||
|
'currentSlide': currentSlide,
|
||||||
|
'origin': o
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
// Handle embedded content
|
// Handle embedded content
|
||||||
if( slideChanged || !previousSlide ) {
|
if( slideChanged || !previousSlide ) {
|
||||||
stopEmbeddedContent( previousSlide );
|
stopEmbeddedContent( previousSlide );
|
||||||
@@ -2523,6 +2731,41 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates reveal.js to keep in sync with new slide attributes. For
|
||||||
|
* example, if you add a new `data-background-image` you can call
|
||||||
|
* this to have reveal.js render the new background image.
|
||||||
|
*
|
||||||
|
* Similar to #sync() but more efficient when you only need to
|
||||||
|
* refresh a specific slide.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide
|
||||||
|
*/
|
||||||
|
function syncSlide( slide ) {
|
||||||
|
|
||||||
|
syncBackground( slide );
|
||||||
|
syncFragments( slide );
|
||||||
|
|
||||||
|
updateBackground();
|
||||||
|
updateNotes();
|
||||||
|
|
||||||
|
loadSlide( slide );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats the fragments on the given slide so that they have
|
||||||
|
* valid indices. Call this if fragments are changed in the DOM
|
||||||
|
* after reveal.js has already initialized.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} slide
|
||||||
|
*/
|
||||||
|
function syncFragments( slide ) {
|
||||||
|
|
||||||
|
sortFragments( slide.querySelectorAll( '.fragment' ) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets all vertical slides so that only the first
|
* Resets all vertical slides so that only the first
|
||||||
* is visible.
|
* is visible.
|
||||||
@@ -2851,6 +3094,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the slide number div to reflect the current slide.
|
* Updates the slide number div to reflect the current slide.
|
||||||
*
|
*
|
||||||
@@ -2873,6 +3117,12 @@
|
|||||||
format = config.slideNumber;
|
format = config.slideNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If there are ONLY vertical slides in this deck, always use
|
||||||
|
// a flattened slide number
|
||||||
|
if( !/c/.test( format ) && dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ).length === 1 ) {
|
||||||
|
format = 'c';
|
||||||
|
}
|
||||||
|
|
||||||
switch( format ) {
|
switch( format ) {
|
||||||
case 'c':
|
case 'c':
|
||||||
value.push( getSlidePastCount() + 1 );
|
value.push( getSlidePastCount() + 1 );
|
||||||
@@ -2905,13 +3155,18 @@
|
|||||||
*/
|
*/
|
||||||
function formatSlideNumber( a, delimiter, b ) {
|
function formatSlideNumber( a, delimiter, b ) {
|
||||||
|
|
||||||
|
var url = '#' + locationHash();
|
||||||
if( typeof b === 'number' && !isNaN( b ) ) {
|
if( typeof b === 'number' && !isNaN( b ) ) {
|
||||||
return '<span class="slide-number-a">'+ a +'</span>' +
|
return '<a href="' + url + '">' +
|
||||||
|
'<span class="slide-number-a">'+ a +'</span>' +
|
||||||
'<span class="slide-number-delimiter">'+ delimiter +'</span>' +
|
'<span class="slide-number-delimiter">'+ delimiter +'</span>' +
|
||||||
'<span class="slide-number-b">'+ b +'</span>';
|
'<span class="slide-number-b">'+ b +'</span>' +
|
||||||
|
'</a>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return '<span class="slide-number-a">'+ a +'</span>';
|
return '<a href="' + url + '">' +
|
||||||
|
'<span class="slide-number-a">'+ a +'</span>' +
|
||||||
|
'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3062,13 +3317,18 @@
|
|||||||
|
|
||||||
startEmbeddedContent( currentBackground );
|
startEmbeddedContent( currentBackground );
|
||||||
|
|
||||||
var backgroundImageURL = currentBackground.style.backgroundImage || '';
|
var currentBackgroundContent = currentBackground.querySelector( '.slide-background-content' );
|
||||||
|
if( currentBackgroundContent ) {
|
||||||
|
|
||||||
|
var backgroundImageURL = currentBackgroundContent.style.backgroundImage || '';
|
||||||
|
|
||||||
// Restart GIFs (doesn't work in Firefox)
|
// Restart GIFs (doesn't work in Firefox)
|
||||||
if( /\.gif/i.test( backgroundImageURL ) ) {
|
if( /\.gif/i.test( backgroundImageURL ) ) {
|
||||||
currentBackground.style.backgroundImage = '';
|
currentBackgroundContent.style.backgroundImage = '';
|
||||||
window.getComputedStyle( currentBackground ).opacity;
|
window.getComputedStyle( currentBackgroundContent ).opacity;
|
||||||
currentBackground.style.backgroundImage = backgroundImageURL;
|
currentBackgroundContent.style.backgroundImage = backgroundImageURL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't transition between identical backgrounds. This
|
// Don't transition between identical backgrounds. This
|
||||||
@@ -3200,11 +3460,12 @@
|
|||||||
|
|
||||||
|
|
||||||
// Show the corresponding background element
|
// Show the corresponding background element
|
||||||
var indices = getIndices( slide );
|
var background = slide.slideBackgroundElement;
|
||||||
var background = getSlideBackground( indices.h, indices.v );
|
|
||||||
if( background ) {
|
if( background ) {
|
||||||
background.style.display = 'block';
|
background.style.display = 'block';
|
||||||
|
|
||||||
|
var backgroundContent = slide.slideBackgroundContentElement;
|
||||||
|
|
||||||
// If the background contains media, load it
|
// If the background contains media, load it
|
||||||
if( background.hasAttribute( 'data-loaded' ) === false ) {
|
if( background.hasAttribute( 'data-loaded' ) === false ) {
|
||||||
background.setAttribute( 'data-loaded', 'true' );
|
background.setAttribute( 'data-loaded', 'true' );
|
||||||
@@ -3217,7 +3478,7 @@
|
|||||||
|
|
||||||
// Images
|
// Images
|
||||||
if( backgroundImage ) {
|
if( backgroundImage ) {
|
||||||
background.style.backgroundImage = 'url('+ backgroundImage +')';
|
backgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')';
|
||||||
}
|
}
|
||||||
// Videos
|
// Videos
|
||||||
else if ( backgroundVideo && !isSpeakerNotes() ) {
|
else if ( backgroundVideo && !isSpeakerNotes() ) {
|
||||||
@@ -3245,7 +3506,7 @@
|
|||||||
video.innerHTML += '<source src="'+ source +'">';
|
video.innerHTML += '<source src="'+ source +'">';
|
||||||
} );
|
} );
|
||||||
|
|
||||||
background.appendChild( video );
|
backgroundContent.appendChild( video );
|
||||||
}
|
}
|
||||||
// Iframes
|
// Iframes
|
||||||
else if( backgroundIframe && options.excludeIframes !== true ) {
|
else if( backgroundIframe && options.excludeIframes !== true ) {
|
||||||
@@ -3268,7 +3529,7 @@
|
|||||||
iframe.style.maxHeight = '100%';
|
iframe.style.maxHeight = '100%';
|
||||||
iframe.style.maxWidth = '100%';
|
iframe.style.maxWidth = '100%';
|
||||||
|
|
||||||
background.appendChild( iframe );
|
backgroundContent.appendChild( iframe );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3288,8 +3549,7 @@
|
|||||||
slide.style.display = 'none';
|
slide.style.display = 'none';
|
||||||
|
|
||||||
// Hide the corresponding background element
|
// Hide the corresponding background element
|
||||||
var indices = getIndices( slide );
|
var background = getSlideBackground( slide );
|
||||||
var background = getSlideBackground( indices.h, indices.v );
|
|
||||||
if( background ) {
|
if( background ) {
|
||||||
background.style.display = 'none';
|
background.style.display = 'none';
|
||||||
}
|
}
|
||||||
@@ -3319,13 +3579,27 @@
|
|||||||
verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
|
verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
|
||||||
|
|
||||||
var routes = {
|
var routes = {
|
||||||
left: indexh > 0 || config.loop,
|
left: indexh > 0,
|
||||||
right: indexh < horizontalSlides.length - 1 || config.loop,
|
right: indexh < horizontalSlides.length - 1,
|
||||||
up: indexv > 0,
|
up: indexv > 0,
|
||||||
down: indexv < verticalSlides.length - 1
|
down: indexv < verticalSlides.length - 1
|
||||||
};
|
};
|
||||||
|
|
||||||
// reverse horizontal controls for rtl
|
// Looped presentations can always be navigated as long as
|
||||||
|
// there are slides available
|
||||||
|
if( config.loop ) {
|
||||||
|
if( horizontalSlides.length > 1 ) {
|
||||||
|
routes.left = true;
|
||||||
|
routes.right = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( verticalSlides.length > 1 ) {
|
||||||
|
routes.up = true;
|
||||||
|
routes.down = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reverse horizontal controls for rtl
|
||||||
if( config.rtl ) {
|
if( config.rtl ) {
|
||||||
var left = routes.left;
|
var left = routes.left;
|
||||||
routes.left = routes.right;
|
routes.left = routes.right;
|
||||||
@@ -3424,9 +3698,16 @@
|
|||||||
|
|
||||||
if( autoplay && typeof el.play === 'function' ) {
|
if( autoplay && typeof el.play === 'function' ) {
|
||||||
|
|
||||||
|
// If the media is ready, start playback
|
||||||
if( el.readyState > 1 ) {
|
if( el.readyState > 1 ) {
|
||||||
startEmbeddedMedia( { target: el } );
|
startEmbeddedMedia( { target: el } );
|
||||||
}
|
}
|
||||||
|
// Mobile devices never fire a loaded event so instead
|
||||||
|
// of waiting, we initiate playback
|
||||||
|
else if( isMobileDevice ) {
|
||||||
|
el.play();
|
||||||
|
}
|
||||||
|
// If the media isn't loaded, wait before playing
|
||||||
else {
|
else {
|
||||||
el.removeEventListener( 'loadeddata', startEmbeddedMedia ); // remove first to avoid dupes
|
el.removeEventListener( 'loadeddata', startEmbeddedMedia ); // remove first to avoid dupes
|
||||||
el.addEventListener( 'loadeddata', startEmbeddedMedia );
|
el.addEventListener( 'loadeddata', startEmbeddedMedia );
|
||||||
@@ -3685,18 +3966,21 @@
|
|||||||
var bits = hash.slice( 2 ).split( '/' ),
|
var bits = hash.slice( 2 ).split( '/' ),
|
||||||
name = hash.replace( /#|\//gi, '' );
|
name = hash.replace( /#|\//gi, '' );
|
||||||
|
|
||||||
// If the first bit is invalid and there is a name we can
|
// If the first bit is not fully numeric and there is a name we
|
||||||
// assume that this is a named link
|
// can assume that this is a named link
|
||||||
if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) {
|
if( !/^[0-9]*$/.test( bits[0] ) && name.length ) {
|
||||||
var element;
|
var element;
|
||||||
|
|
||||||
// Ensure the named link is a valid HTML ID attribute
|
// Ensure the named link is a valid HTML ID attribute
|
||||||
if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) {
|
try {
|
||||||
// Find the slide with the specified ID
|
element = document.getElementById( decodeURIComponent( name ) );
|
||||||
element = document.getElementById( name );
|
|
||||||
}
|
}
|
||||||
|
catch ( error ) { }
|
||||||
|
|
||||||
if( element ) {
|
// Ensure that we're not already on a slide with the same name
|
||||||
|
var isSameNameAsCurrentSlide = currentSlide ? currentSlide.getAttribute( 'id' ) === name : false;
|
||||||
|
|
||||||
|
if( element && !isSameNameAsCurrentSlide ) {
|
||||||
// Find the position of the named slide and navigate to it
|
// Find the position of the named slide and navigate to it
|
||||||
var indices = Reveal.getIndices( element );
|
var indices = Reveal.getIndices( element );
|
||||||
slide( indices.h, indices.v );
|
slide( indices.h, indices.v );
|
||||||
@@ -3707,12 +3991,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Read the index components of the hash
|
var hashIndexBase = config.hashOneBasedIndex ? 1 : 0;
|
||||||
var h = parseInt( bits[0], 10 ) || 0,
|
|
||||||
v = parseInt( bits[1], 10 ) || 0;
|
|
||||||
|
|
||||||
if( h !== indexh || v !== indexv ) {
|
// Read the index components of the hash
|
||||||
slide( h, v );
|
var h = ( parseInt( bits[0], 10 ) - hashIndexBase ) || 0,
|
||||||
|
v = ( parseInt( bits[1], 10 ) - hashIndexBase ) || 0,
|
||||||
|
f;
|
||||||
|
|
||||||
|
if( config.fragmentInURL ) {
|
||||||
|
f = parseInt( bits[2], 10 );
|
||||||
|
if( isNaN( f ) ) {
|
||||||
|
f = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( h !== indexh || v !== indexv || f !== undefined ) {
|
||||||
|
slide( h, v, f );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3737,25 +4031,7 @@
|
|||||||
writeURLTimeout = setTimeout( writeURL, delay );
|
writeURLTimeout = setTimeout( writeURL, delay );
|
||||||
}
|
}
|
||||||
else if( currentSlide ) {
|
else if( currentSlide ) {
|
||||||
var url = '/';
|
window.location.hash = locationHash();
|
||||||
|
|
||||||
// Attempt to create a named link based on the slide's ID
|
|
||||||
var id = currentSlide.getAttribute( 'id' );
|
|
||||||
if( id ) {
|
|
||||||
id = id.replace( /[^a-zA-Z0-9\-\_\:\.]/g, '' );
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the current slide has an ID, use that as a named link
|
|
||||||
if( typeof id === 'string' && id.length ) {
|
|
||||||
url = '/' + id;
|
|
||||||
}
|
|
||||||
// Otherwise use the /h/v index
|
|
||||||
else {
|
|
||||||
if( indexh > 0 || indexv > 0 ) url += indexh;
|
|
||||||
if( indexv > 0 ) url += '/' + indexv;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.hash = url;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3858,13 +4134,14 @@
|
|||||||
* defined, have a background element so as long as the
|
* defined, have a background element so as long as the
|
||||||
* index is valid an element will be returned.
|
* index is valid an element will be returned.
|
||||||
*
|
*
|
||||||
* @param {number} x Horizontal background index
|
* @param {mixed} x Horizontal background index OR a slide
|
||||||
|
* HTML element
|
||||||
* @param {number} y Vertical background index
|
* @param {number} y Vertical background index
|
||||||
* @return {(HTMLElement[]|*)}
|
* @return {(HTMLElement[]|*)}
|
||||||
*/
|
*/
|
||||||
function getSlideBackground( x, y ) {
|
function getSlideBackground( x, y ) {
|
||||||
|
|
||||||
var slide = getSlide( x, y );
|
var slide = typeof x === 'number' ? getSlide( x, y ) : x;
|
||||||
if( slide ) {
|
if( slide ) {
|
||||||
return slide.slideBackgroundElement;
|
return slide.slideBackgroundElement;
|
||||||
}
|
}
|
||||||
@@ -3963,9 +4240,11 @@
|
|||||||
* the fragment within the fragments list.
|
* the fragment within the fragments list.
|
||||||
*
|
*
|
||||||
* @param {object[]|*} fragments
|
* @param {object[]|*} fragments
|
||||||
|
* @param {boolean} grouped If true the returned array will contain
|
||||||
|
* nested arrays for all fragments with the same index
|
||||||
* @return {object[]} sorted Sorted array of fragments
|
* @return {object[]} sorted Sorted array of fragments
|
||||||
*/
|
*/
|
||||||
function sortFragments( fragments ) {
|
function sortFragments( fragments, grouped ) {
|
||||||
|
|
||||||
fragments = toArray( fragments );
|
fragments = toArray( fragments );
|
||||||
|
|
||||||
@@ -4008,7 +4287,7 @@
|
|||||||
index ++;
|
index ++;
|
||||||
} );
|
} );
|
||||||
|
|
||||||
return sorted;
|
return grouped === true ? ordered : sorted;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4089,6 +4368,9 @@
|
|||||||
|
|
||||||
updateControls();
|
updateControls();
|
||||||
updateProgress();
|
updateProgress();
|
||||||
|
if( config.fragmentInURL ) {
|
||||||
|
writeURL();
|
||||||
|
}
|
||||||
|
|
||||||
return !!( fragmentsShown.length || fragmentsHidden.length );
|
return !!( fragmentsShown.length || fragmentsHidden.length );
|
||||||
|
|
||||||
@@ -4328,7 +4610,17 @@
|
|||||||
|
|
||||||
// Prioritize revealing fragments
|
// Prioritize revealing fragments
|
||||||
if( nextFragment() === false ) {
|
if( nextFragment() === false ) {
|
||||||
if( availableRoutes().down ) {
|
|
||||||
|
var routes = availableRoutes();
|
||||||
|
|
||||||
|
// When looping is enabled `routes.down` is always available
|
||||||
|
// so we need a separate check for when we've reached the
|
||||||
|
// end of a stack and should move horizontally
|
||||||
|
if( routes.down && routes.right && config.loop && Reveal.isLastVerticalSlide( currentSlide ) ) {
|
||||||
|
routes.down = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( routes.down ) {
|
||||||
navigateDown();
|
navigateDown();
|
||||||
}
|
}
|
||||||
else if( config.rtl ) {
|
else if( config.rtl ) {
|
||||||
@@ -4398,7 +4690,7 @@
|
|||||||
|
|
||||||
// If there's a condition specified and it returns false,
|
// If there's a condition specified and it returns false,
|
||||||
// ignore this event
|
// ignore this event
|
||||||
if( typeof config.keyboardCondition === 'function' && config.keyboardCondition() === false ) {
|
if( typeof config.keyboardCondition === 'function' && config.keyboardCondition(event) === false ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4463,7 +4755,31 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. System defined key bindings
|
// 2. Registered custom key bindings
|
||||||
|
if( triggered === false ) {
|
||||||
|
|
||||||
|
for( key in registeredKeyBindings ) {
|
||||||
|
|
||||||
|
// Check if this binding matches the pressed key
|
||||||
|
if( parseInt( key, 10 ) === event.keyCode ) {
|
||||||
|
|
||||||
|
var action = registeredKeyBindings[ key ].callback;
|
||||||
|
|
||||||
|
// Callback function
|
||||||
|
if( typeof action === 'function' ) {
|
||||||
|
action.apply( null, [ event ] );
|
||||||
|
}
|
||||||
|
// String shortcuts to reveal.js API
|
||||||
|
else if( typeof action === 'string' && typeof Reveal[ action ] === 'function' ) {
|
||||||
|
Reveal[ action ].call();
|
||||||
|
}
|
||||||
|
|
||||||
|
triggered = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. System defined key bindings
|
||||||
if( triggered === false ) {
|
if( triggered === false ) {
|
||||||
|
|
||||||
// Assume true and try to prove false
|
// Assume true and try to prove false
|
||||||
@@ -5057,7 +5373,10 @@
|
|||||||
|
|
||||||
initialize: initialize,
|
initialize: initialize,
|
||||||
configure: configure,
|
configure: configure,
|
||||||
|
|
||||||
sync: sync,
|
sync: sync,
|
||||||
|
syncSlide: syncSlide,
|
||||||
|
syncFragments: syncFragments,
|
||||||
|
|
||||||
// Navigation methods
|
// Navigation methods
|
||||||
slide: slide,
|
slide: slide,
|
||||||
@@ -5194,7 +5513,7 @@
|
|||||||
// Returns true if we're currently on the last slide
|
// Returns true if we're currently on the last slide
|
||||||
isLastSlide: function() {
|
isLastSlide: function() {
|
||||||
if( currentSlide ) {
|
if( currentSlide ) {
|
||||||
// Does this slide has next a sibling?
|
// Does this slide have a next sibling?
|
||||||
if( currentSlide.nextElementSibling ) return false;
|
if( currentSlide.nextElementSibling ) return false;
|
||||||
|
|
||||||
// If it's vertical, does its parent have a next sibling?
|
// If it's vertical, does its parent have a next sibling?
|
||||||
@@ -5206,6 +5525,19 @@
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Returns true if we're on the last slide in the current
|
||||||
|
// vertical stack
|
||||||
|
isLastVerticalSlide: function() {
|
||||||
|
if( currentSlide && isVerticalSlide( currentSlide ) ) {
|
||||||
|
// Does this slide have a next sibling?
|
||||||
|
if( currentSlide.nextElementSibling ) return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
// Checks if reveal.js has been loaded and is ready for use
|
// Checks if reveal.js has been loaded and is ready for use
|
||||||
isReady: function() {
|
isReady: function() {
|
||||||
return loaded;
|
return loaded;
|
||||||
@@ -5223,6 +5555,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Adds a custom key binding
|
||||||
|
addKeyBinding: addKeyBinding,
|
||||||
|
|
||||||
|
// Removes a custom key binding
|
||||||
|
removeKeyBinding: removeKeyBinding,
|
||||||
|
|
||||||
// Programatically triggers a keyboard event
|
// Programatically triggers a keyboard event
|
||||||
triggerKey: function( keyCode ) {
|
triggerKey: function( keyCode ) {
|
||||||
onDocumentKeyDown( { keyCode: keyCode } );
|
onDocumentKeyDown( { keyCode: keyCode } );
|
||||||
|
9
js/reveal.min.js
vendored
Normal file
9
js/reveal.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -99,6 +99,13 @@
|
|||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Images -->
|
||||||
|
<section data-markdown>
|
||||||
|
<script type="text/template">
|
||||||
|

|
||||||
|
</script>
|
||||||
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -29,3 +29,8 @@ Content 3.1
|
|||||||
## External 3.2
|
## External 3.2
|
||||||
|
|
||||||
Content 3.2
|
Content 3.2
|
||||||
|
|
||||||
|
|
||||||
|
## External 3.3
|
||||||
|
|
||||||
|

|
||||||
|
@@ -9,15 +9,15 @@ var RevealMath = window.RevealMath || (function(){
|
|||||||
var options = Reveal.getConfig().math || {};
|
var options = Reveal.getConfig().math || {};
|
||||||
options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
|
options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
|
||||||
options.config = options.config || 'TeX-AMS_HTML-full';
|
options.config = options.config || 'TeX-AMS_HTML-full';
|
||||||
|
options.tex2jax = options.tex2jax || {
|
||||||
|
inlineMath: [['$','$'],['\\(','\\)']] ,
|
||||||
|
skipTags: ['script','noscript','style','textarea','pre'] };
|
||||||
|
|
||||||
loadScript( options.mathjax + '?config=' + options.config, function() {
|
loadScript( options.mathjax + '?config=' + options.config, function() {
|
||||||
|
|
||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
messageStyle: 'none',
|
messageStyle: 'none',
|
||||||
tex2jax: {
|
tex2jax: options.tex2jax,
|
||||||
inlineMath: [['$','$'],['\\(','\\)']] ,
|
|
||||||
skipTags: ['script','noscript','style','textarea','pre']
|
|
||||||
},
|
|
||||||
skipStartupTypeset: true
|
skipStartupTypeset: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"name": "reveal-js-multiplex",
|
"name": "reveal-js-multiplex",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "reveal.js multiplex server",
|
"description": "reveal.js multiplex server",
|
||||||
"homepage": "http://lab.hakim.se/reveal-js",
|
"homepage": "http://revealjs.com",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node index.js"
|
"start": "node index.js"
|
||||||
},
|
},
|
||||||
|
@@ -34,6 +34,22 @@
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#connection-status {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 20;
|
||||||
|
padding: 30% 20% 20% 20%;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #222;
|
||||||
|
background: #fff;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
.overlay-element {
|
.overlay-element {
|
||||||
height: 34px;
|
height: 34px;
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
@@ -288,6 +304,8 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<div id="connection-status">Loading speaker view...</div>
|
||||||
|
|
||||||
<div id="current-slide"></div>
|
<div id="current-slide"></div>
|
||||||
<div id="upcoming-slide"><span class="overlay-element label">Upcoming</span></div>
|
<div id="upcoming-slide"><span class="overlay-element label">Upcoming</span></div>
|
||||||
<div id="speaker-controls">
|
<div id="speaker-controls">
|
||||||
@@ -340,8 +358,16 @@
|
|||||||
|
|
||||||
setupLayout();
|
setupLayout();
|
||||||
|
|
||||||
|
var connectionStatus = document.querySelector( '#connection-status' );
|
||||||
|
var connectionTimeout = setTimeout( function() {
|
||||||
|
connectionStatus.innerHTML = 'Error connecting to main window.<br>Please try closing and reopening the speaker view.';
|
||||||
|
}, 5000 );
|
||||||
|
|
||||||
window.addEventListener( 'message', function( event ) {
|
window.addEventListener( 'message', function( event ) {
|
||||||
|
|
||||||
|
clearTimeout( connectionTimeout );
|
||||||
|
connectionStatus.style.display = 'none';
|
||||||
|
|
||||||
var data = JSON.parse( event.data );
|
var data = JSON.parse( event.data );
|
||||||
|
|
||||||
// The overview mode is only useful to the reveal.js instance
|
// The overview mode is only useful to the reveal.js instance
|
||||||
@@ -427,10 +453,17 @@
|
|||||||
* Forward keyboard events to the current slide window.
|
* Forward keyboard events to the current slide window.
|
||||||
* This enables keyboard events to work even if focus
|
* This enables keyboard events to work even if focus
|
||||||
* isn't set on the current slide iframe.
|
* isn't set on the current slide iframe.
|
||||||
|
*
|
||||||
|
* Block F5 default handling, it reloads and disconnects
|
||||||
|
* the speaker notes window.
|
||||||
*/
|
*/
|
||||||
function setupKeyboard() {
|
function setupKeyboard() {
|
||||||
|
|
||||||
document.addEventListener( 'keydown', function( event ) {
|
document.addEventListener( 'keydown', function( event ) {
|
||||||
|
if( event.keyCode === 116 || ( event.metaKey && event.keyCode === 82 ) ) {
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
|
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
@@ -21,8 +21,13 @@ var RevealNotes = (function() {
|
|||||||
|
|
||||||
var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
|
var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
|
||||||
|
|
||||||
|
if( !notesPopup ) {
|
||||||
|
alert( 'Speaker view popup failed to open. Please make sure popups are allowed and reopen the speaker view.' );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Allow popup window access to Reveal API
|
// Allow popup window access to Reveal API
|
||||||
notesPopup.Reveal = this.Reveal;
|
notesPopup.Reveal = window.Reveal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to the notes window through a postmessage handshake.
|
* Connect to the notes window through a postmessage handshake.
|
||||||
@@ -131,22 +136,9 @@ var RevealNotes = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Open the notes when the 's' key is hit
|
// Open the notes when the 's' key is hit
|
||||||
document.addEventListener( 'keydown', function( event ) {
|
Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() {
|
||||||
// Disregard the event if the target is editable or a
|
|
||||||
// modifier is present
|
|
||||||
if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
|
|
||||||
|
|
||||||
// Disregard the event if keyboard is disabled
|
|
||||||
if ( Reveal.getConfig().keyboard === false ) return;
|
|
||||||
|
|
||||||
if( event.keyCode === 83 ) {
|
|
||||||
event.preventDefault();
|
|
||||||
openNotes();
|
openNotes();
|
||||||
}
|
} );
|
||||||
}, false );
|
|
||||||
|
|
||||||
// Show our keyboard shortcut in the reveal.js help overlay
|
|
||||||
if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* phantomjs script for printing presentations to PDF.
|
* phantomjs script for printing presentations to PDF.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf
|
* phantomjs print-pdf.js "http://revealjs.com?print-pdf" reveal-demo.pdf
|
||||||
*
|
*
|
||||||
* @author Manuel Bieh (https://github.com/manuelbieh)
|
* @author Manuel Bieh (https://github.com/manuelbieh)
|
||||||
* @author Hakim El Hattab (https://github.com/hakimel)
|
* @author Hakim El Hattab (https://github.com/hakimel)
|
||||||
@@ -42,28 +42,26 @@ probePage.open( inputFile, function( status ) {
|
|||||||
|
|
||||||
printPage.open( inputFile, function( status ) {
|
printPage.open( inputFile, function( status ) {
|
||||||
console.log( 'Export PDF: Preparing pdf [3/4]')
|
console.log( 'Export PDF: Preparing pdf [3/4]')
|
||||||
printPage.evaluate(function() {
|
printPage.evaluate( function() {
|
||||||
Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom );
|
Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom );
|
||||||
});
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
printPage.onCallback = function(data) {
|
printPage.onCallback = function( data ) {
|
||||||
// For some reason we need to "jump the queue" for syntax highlighting to work.
|
// For some reason we need to "jump the queue" for syntax highlighting to work.
|
||||||
// See: http://stackoverflow.com/a/3580132/129269
|
// See: http://stackoverflow.com/a/3580132/129269
|
||||||
setTimeout(function() {
|
setTimeout( function() {
|
||||||
console.log( 'Export PDF: Writing file [4/4]' );
|
console.log( 'Export PDF: Writing file [4/4]' );
|
||||||
printPage.render( outputFile );
|
printPage.render( outputFile );
|
||||||
console.log( 'Export PDF: Finished successfully!' );
|
console.log( 'Export PDF: Finished successfully!' );
|
||||||
phantom.exit();
|
phantom.exit();
|
||||||
}, 0);
|
}, 0 );
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' );
|
console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' );
|
||||||
phantom.exit(1);
|
phantom.exit( 1 );
|
||||||
|
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
@@ -178,11 +178,11 @@ function Hilitor(id, tag)
|
|||||||
dom.wrapper.appendChild( searchElement );
|
dom.wrapper.appendChild( searchElement );
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("searchbutton").addEventListener( 'click', function(event) {
|
document.getElementById( 'searchbutton' ).addEventListener( 'click', function(event) {
|
||||||
doSearch();
|
doSearch();
|
||||||
}, false );
|
}, false );
|
||||||
|
|
||||||
document.getElementById("searchinput").addEventListener( 'keyup', function( event ) {
|
document.getElementById( 'searchinput' ).addEventListener( 'keyup', function( event ) {
|
||||||
switch (event.keyCode) {
|
switch (event.keyCode) {
|
||||||
case 13:
|
case 13:
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -195,7 +195,7 @@ function Hilitor(id, tag)
|
|||||||
}, false );
|
}, false );
|
||||||
|
|
||||||
document.addEventListener( 'keydown', function( event ) {
|
document.addEventListener( 'keydown', function( event ) {
|
||||||
if( event.key == "F" && (event.ctrlKey || event.metaKey) ) {//Control+Shift+f
|
if( event.key == "F" && (event.ctrlKey || event.metaKey) ) { //Control+Shift+f
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
toggleSearch();
|
toggleSearch();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user