From 10d100d2750c99a9fdc18862ad292cdc583d7b05 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 16 Aug 2018 11:16:36 +0200 Subject: [PATCH] 3.7.0 --- css/print/pdf.css | 22 +- css/reveal.css | 48 ++- css/reveal.min.css | 7 + css/reveal.scss | 57 ++- css/theme/README.md | 2 +- css/theme/beige.css | 17 +- css/theme/black.css | 17 +- css/theme/blood.css | 17 +- css/theme/league.css | 17 +- css/theme/moon.css | 17 +- css/theme/night.css | 17 +- css/theme/serif.css | 17 +- css/theme/simple.css | 17 +- css/theme/sky.css | 17 +- css/theme/solarized.css | 17 +- css/theme/template/theme.scss | 17 +- css/theme/white.css | 17 +- js/reveal.js | 696 +++++++++++++++++++++++++--------- js/reveal.min.js | 9 + plugin/markdown/example.html | 7 + plugin/markdown/example.md | 5 + plugin/math/math.js | 8 +- plugin/multiplex/package.json | 2 +- plugin/notes/notes.html | 33 ++ plugin/notes/notes.js | 26 +- plugin/print-pdf/print-pdf.js | 20 +- plugin/search/search.js | 168 ++++---- 27 files changed, 940 insertions(+), 374 deletions(-) create mode 100644 css/reveal.min.css create mode 100644 js/reveal.min.js diff --git a/css/print/pdf.css b/css/print/pdf.css index aa1f7fab..752d9554 100644 --- a/css/print/pdf.css +++ b/css/print/pdf.css @@ -72,15 +72,8 @@ ul, ol, div, p { overflow: visible; display: block; - -webkit-perspective: none; - -moz-perspective: none; - -ms-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: none; + perspective-origin: 50% 50%; } .reveal .slides .pdf-page { @@ -103,15 +96,8 @@ ul, ol, div, p { opacity: 1 !important; - -webkit-transform-style: flat !important; - -moz-transform-style: flat !important; - -ms-transform-style: flat !important; - transform-style: flat !important; - - -webkit-transform: none !important; - -moz-transform: none !important; - -ms-transform: none !important; - transform: none !important; + transform-style: flat !important; + transform: none !important; } .reveal section.stack { diff --git a/css/reveal.css b/css/reveal.css index 8acd961a..eda311e8 100644 --- a/css/reveal.css +++ b/css/reveal.css @@ -1,9 +1,9 @@ /*! * reveal.js - * http://lab.hakim.se/reveal-js + * http://revealjs.com * MIT licensed * - * Copyright (C) 2017 Hakim El Hattab, http://hakim.se + * Copyright (C) 2018 Hakim El Hattab, http://hakim.se */ /********************************************* * RESET STYLES @@ -127,13 +127,25 @@ body { -webkit-transform: translate(0, 0); transform: translate(0, 0); } +.reveal .slides section .fragment.fade-in-then-out, .reveal .slides section .fragment.current-visible { opacity: 0; visibility: hidden; } + .reveal .slides section .fragment.fade-in-then-out.current-fragment, .reveal .slides section .fragment.current-visible.current-fragment { opacity: 1; 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-current-red, .reveal .slides section .fragment.highlight-green, @@ -448,7 +460,7 @@ body { * SLIDE NUMBER *********************************************/ .reveal .slide-number { - position: fixed; + position: absolute; display: block; right: 8px; bottom: 8px; @@ -460,6 +472,9 @@ body { background-color: rgba(0, 0, 0, 0.4); padding: 5px; } +.reveal .slide-number a { + color: currentColor; } + .reveal .slide-number-delimiter { margin: 0 3px; } @@ -528,7 +543,8 @@ body { .reveal .slides > section.stack { padding-top: 0; - padding-bottom: 0; } + padding-bottom: 0; + pointer-events: none; } .reveal .slides > section.present, .reveal .slides > section > section.present { @@ -948,6 +964,21 @@ body { z-index: 100; 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 { visibility: visible; opacity: 1; } @@ -1011,10 +1042,15 @@ body { visibility: hidden; overflow: hidden; 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-repeat: no-repeat; - background-size: cover; - transition: all 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + background-size: cover; } .reveal .slide-background.stack { display: block; } diff --git a/css/reveal.min.css b/css/reveal.min.css new file mode 100644 index 00000000..3ee3a082 --- /dev/null +++ b/css/reveal.min.css @@ -0,0 +1,7 @@ +/*! + * reveal.js + * http://revealjs.com + * MIT licensed + * + * Copyright (C) 2018 Hakim El Hattab, http://hakim.se + */.reveal a,.reveal abbr,.reveal acronym,.reveal address,.reveal applet,.reveal article,.reveal aside,.reveal audio,.reveal b,.reveal big,.reveal blockquote,.reveal canvas,.reveal caption,.reveal center,.reveal cite,.reveal code,.reveal dd,.reveal del,.reveal details,.reveal dfn,.reveal div,.reveal dl,.reveal dt,.reveal em,.reveal embed,.reveal fieldset,.reveal figcaption,.reveal figure,.reveal footer,.reveal form,.reveal h1,.reveal h2,.reveal h3,.reveal h4,.reveal h5,.reveal h6,.reveal header,.reveal hgroup,.reveal iframe,.reveal img,.reveal ins,.reveal kbd,.reveal label,.reveal legend,.reveal li,.reveal mark,.reveal menu,.reveal nav,.reveal object,.reveal ol,.reveal output,.reveal p,.reveal pre,.reveal q,.reveal ruby,.reveal s,.reveal samp,.reveal section,.reveal small,.reveal span,.reveal strike,.reveal strong,.reveal sub,.reveal summary,.reveal sup,.reveal table,.reveal tbody,.reveal td,.reveal tfoot,.reveal th,.reveal thead,.reveal time,.reveal tr,.reveal tt,.reveal u,.reveal ul,.reveal var,.reveal video,body,html{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}body,html{width:100%;height:100%;overflow:hidden}body{position:relative;line-height:1;background-color:#fff;color:#000}.reveal .slides section .fragment{opacity:0;visibility:hidden;transition:all .2s ease}.reveal .slides section .fragment.visible{opacity:1;visibility:inherit}.reveal .slides section .fragment.grow{opacity:1;visibility:inherit}.reveal .slides section .fragment.grow.visible{-webkit-transform:scale(1.3);transform:scale(1.3)}.reveal .slides section .fragment.shrink{opacity:1;visibility:inherit}.reveal .slides section .fragment.shrink.visible{-webkit-transform:scale(.7);transform:scale(.7)}.reveal .slides section .fragment.zoom-in{-webkit-transform:scale(.1);transform:scale(.1)}.reveal .slides section .fragment.zoom-in.visible{-webkit-transform:none;transform:none}.reveal .slides section .fragment.fade-out{opacity:1;visibility:inherit}.reveal .slides section .fragment.fade-out.visible{opacity:0;visibility:hidden}.reveal .slides section .fragment.semi-fade-out{opacity:1;visibility:inherit}.reveal .slides section .fragment.semi-fade-out.visible{opacity:.5;visibility:inherit}.reveal .slides section .fragment.strike{opacity:1;visibility:inherit}.reveal .slides section .fragment.strike.visible{text-decoration:line-through}.reveal .slides section .fragment.fade-up{-webkit-transform:translate(0,20%);transform:translate(0,20%)}.reveal .slides section .fragment.fade-up.visible{-webkit-transform:translate(0,0);transform:translate(0,0)}.reveal .slides section .fragment.fade-down{-webkit-transform:translate(0,-20%);transform:translate(0,-20%)}.reveal .slides section .fragment.fade-down.visible{-webkit-transform:translate(0,0);transform:translate(0,0)}.reveal .slides section .fragment.fade-right{-webkit-transform:translate(-20%,0);transform:translate(-20%,0)}.reveal .slides section .fragment.fade-right.visible{-webkit-transform:translate(0,0);transform:translate(0,0)}.reveal .slides section .fragment.fade-left{-webkit-transform:translate(20%,0);transform:translate(20%,0)}.reveal .slides section .fragment.fade-left.visible{-webkit-transform:translate(0,0);transform:translate(0,0)}.reveal .slides section .fragment.current-visible,.reveal .slides section .fragment.fade-in-then-out{opacity:0;visibility:hidden}.reveal .slides section .fragment.current-visible.current-fragment,.reveal .slides section .fragment.fade-in-then-out.current-fragment{opacity:1;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:.5;visibility:inherit}.reveal .slides section .fragment.fade-in-then-semi-out.current-fragment{opacity:1;visibility:inherit}.reveal .slides section .fragment.highlight-blue,.reveal .slides section .fragment.highlight-current-blue,.reveal .slides section .fragment.highlight-current-green,.reveal .slides section .fragment.highlight-current-red,.reveal .slides section .fragment.highlight-green,.reveal .slides section .fragment.highlight-red{opacity:1;visibility:inherit}.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 .slides section .fragment.highlight-current-red.current-fragment{color:#ff2c2d}.reveal .slides section .fragment.highlight-current-green.current-fragment{color:#17ff2e}.reveal .slides section .fragment.highlight-current-blue.current-fragment{color:#1b91ff}.reveal:after{content:'';font-style:italic}.reveal iframe{z-index:1}.reveal a{position:relative}.reveal .stretch{max-width:none;max-height:none}.reveal pre.stretch code{height:100%;max-height:100%;box-sizing:border-box}@-webkit-keyframes bounce-right{0%,10%,25%,40%,50%{-webkit-transform:translateX(0);transform:translateX(0)}20%{-webkit-transform:translateX(10px);transform:translateX(10px)}30%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}}@keyframes bounce-right{0%,10%,25%,40%,50%{-webkit-transform:translateX(0);transform:translateX(0)}20%{-webkit-transform:translateX(10px);transform:translateX(10px)}30%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}}@-webkit-keyframes bounce-down{0%,10%,25%,40%,50%{-webkit-transform:translateY(0);transform:translateY(0)}20%{-webkit-transform:translateY(10px);transform:translateY(10px)}30%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}@keyframes bounce-down{0%,10%,25%,40%,50%{-webkit-transform:translateY(0);transform:translateY(0)}20%{-webkit-transform:translateY(10px);transform:translateY(10px)}30%{-webkit-transform:translateY(-5px);transform:translateY(-5px)}}.reveal .controls{display:none;position:absolute;top:auto;bottom:12px;right:12px;left:auto;z-index:1;color:#000;pointer-events:none;font-size:10px}.reveal .controls button{position:absolute;padding:0;background-color:transparent;border:0;outline:0;cursor:pointer;color:currentColor;-webkit-transform:scale(.9999);transform:scale(.9999);transition:color .2s ease,opacity .2s ease,-webkit-transform .2s ease;transition:color .2s ease,opacity .2s ease,transform .2s ease;z-index:2;pointer-events:auto;font-size:inherit;visibility:hidden;opacity:0;-webkit-appearance:none;-webkit-tap-highlight-color:transparent}.reveal .controls .controls-arrow:after,.reveal .controls .controls-arrow:before{content:'';position:absolute;top:0;left:0;width:2.6em;height:.5em;border-radius:.25em;background-color:currentColor;transition:all .15s ease,background-color .8s ease;-webkit-transform-origin:.2em 50%;transform-origin:.2em 50%;will-change:transform}.reveal .controls .controls-arrow{position:relative;width:3.6em;height:3.6em}.reveal .controls .controls-arrow:before{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(45deg);transform:translateX(.5em) translateY(1.55em) rotate(45deg)}.reveal .controls .controls-arrow:after{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(-45deg);transform:translateX(.5em) translateY(1.55em) rotate(-45deg)}.reveal .controls .controls-arrow:hover:before{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(40deg);transform:translateX(.5em) translateY(1.55em) rotate(40deg)}.reveal .controls .controls-arrow:hover:after{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(-40deg);transform:translateX(.5em) translateY(1.55em) rotate(-40deg)}.reveal .controls .controls-arrow:active:before{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(36deg);transform:translateX(.5em) translateY(1.55em) rotate(36deg)}.reveal .controls .controls-arrow:active:after{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(-36deg);transform:translateX(.5em) translateY(1.55em) rotate(-36deg)}.reveal .controls .navigate-left{right:6.4em;bottom:3.2em;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.reveal .controls .navigate-right{right:0;bottom:3.2em;-webkit-transform:translateX(10px);transform:translateX(10px)}.reveal .controls .navigate-right .controls-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.reveal .controls .navigate-right.highlight{-webkit-animation:bounce-right 2s 50 both ease-out;animation:bounce-right 2s 50 both ease-out}.reveal .controls .navigate-up{right:3.2em;bottom:6.4em;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.reveal .controls .navigate-up .controls-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.reveal .controls .navigate-down{right:3.2em;bottom:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.reveal .controls .navigate-down .controls-arrow{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.reveal .controls .navigate-down.highlight{-webkit-animation:bounce-down 2s 50 both ease-out;animation:bounce-down 2s 50 both ease-out}.reveal .controls[data-controls-back-arrows=faded] .navigate-left.enabled,.reveal .controls[data-controls-back-arrows=faded] .navigate-up.enabled{opacity:.3}.reveal .controls[data-controls-back-arrows=faded] .navigate-left.enabled:hover,.reveal .controls[data-controls-back-arrows=faded] .navigate-up.enabled:hover{opacity:1}.reveal .controls[data-controls-back-arrows=hidden] .navigate-left.enabled,.reveal .controls[data-controls-back-arrows=hidden] .navigate-up.enabled{opacity:0;visibility:hidden}.reveal .controls .enabled{visibility:visible;opacity:.9;cursor:pointer;-webkit-transform:none;transform:none}.reveal .controls .enabled.fragmented{opacity:.5}.reveal .controls .enabled.fragmented:hover,.reveal .controls .enabled:hover{opacity:1}.reveal:not(.has-vertical-slides) .controls .navigate-left{bottom:1.4em;right:5.5em}.reveal:not(.has-vertical-slides) .controls .navigate-right{bottom:1.4em;right:.5em}.reveal:not(.has-horizontal-slides) .controls .navigate-up{right:1.4em;bottom:5em}.reveal:not(.has-horizontal-slides) .controls .navigate-down{right:1.4em;bottom:.5em}.reveal.has-dark-background .controls{color:#fff}.reveal.has-light-background .controls{color:#000}.reveal.no-hover .controls .controls-arrow:active:before,.reveal.no-hover .controls .controls-arrow:hover:before{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(45deg);transform:translateX(.5em) translateY(1.55em) rotate(45deg)}.reveal.no-hover .controls .controls-arrow:active:after,.reveal.no-hover .controls .controls-arrow:hover:after{-webkit-transform:translateX(.5em) translateY(1.55em) rotate(-45deg);transform:translateX(.5em) translateY(1.55em) rotate(-45deg)}@media screen and (min-width:500px){.reveal .controls[data-controls-layout=edges]{top:0;right:0;bottom:0;left:0}.reveal .controls[data-controls-layout=edges] .navigate-down,.reveal .controls[data-controls-layout=edges] .navigate-left,.reveal .controls[data-controls-layout=edges] .navigate-right,.reveal .controls[data-controls-layout=edges] .navigate-up{bottom:auto;right:auto}.reveal .controls[data-controls-layout=edges] .navigate-left{top:50%;left:8px;margin-top:-1.8em}.reveal .controls[data-controls-layout=edges] .navigate-right{top:50%;right:8px;margin-top:-1.8em}.reveal .controls[data-controls-layout=edges] .navigate-up{top:8px;left:50%;margin-left:-1.8em}.reveal .controls[data-controls-layout=edges] .navigate-down{bottom:8px;left:50%;margin-left:-1.8em}}.reveal .progress{position:absolute;display:none;height:3px;width:100%;bottom:0;left:0;z-index:10;background-color:rgba(0,0,0,.2);color:#fff}.reveal .progress:after{content:'';display:block;position:absolute;height:10px;width:100%;top:-10px}.reveal .progress span{display:block;height:100%;width:0;background-color:currentColor;transition:width .8s cubic-bezier(.26,.86,.44,.985)}.reveal .slide-number{position:absolute;display:block;right:8px;bottom:8px;z-index:31;font-family:Helvetica,sans-serif;font-size:12px;line-height:1;color:#fff;background-color:rgba(0,0,0,.4);padding:5px}.reveal .slide-number a{color:currentColor}.reveal .slide-number-delimiter{margin:0 3px}.reveal{position:relative;width:100%;height:100%;overflow:hidden;-ms-touch-action:none;touch-action:none}@media only screen and (orientation:landscape){.reveal.ua-iphone{position:fixed}}.reveal .slides{position:absolute;width:100%;height:100%;top:0;right:0;bottom:0;left:0;margin:auto;pointer-events:none;overflow:visible;z-index:1;text-align:center;-webkit-perspective:600px;perspective:600px;-webkit-perspective-origin:50% 40%;perspective-origin:50% 40%}.reveal .slides>section{-ms-perspective:600px}.reveal .slides>section,.reveal .slides>section>section{display:none;position:absolute;width:100%;padding:20px 0;pointer-events:auto;z-index:10;-webkit-transform-style:flat;transform-style:flat;transition:-webkit-transform-origin .8s cubic-bezier(.26,.86,.44,.985),-webkit-transform .8s cubic-bezier(.26,.86,.44,.985),visibility .8s cubic-bezier(.26,.86,.44,.985),opacity .8s cubic-bezier(.26,.86,.44,.985);transition:transform-origin .8s cubic-bezier(.26,.86,.44,.985),transform .8s cubic-bezier(.26,.86,.44,.985),visibility .8s cubic-bezier(.26,.86,.44,.985),opacity .8s cubic-bezier(.26,.86,.44,.985)}.reveal[data-transition-speed=fast] .slides section{transition-duration:.4s}.reveal[data-transition-speed=slow] .slides section{transition-duration:1.2s}.reveal .slides section[data-transition-speed=fast]{transition-duration:.4s}.reveal .slides section[data-transition-speed=slow]{transition-duration:1.2s}.reveal .slides>section.stack{padding-top:0;padding-bottom:0;pointer-events:none}.reveal .slides>section.present,.reveal .slides>section>section.present{display:block;z-index:11;opacity:1}.reveal .slides>section:empty,.reveal .slides>section>section:empty,.reveal .slides>section>section[data-background-interactive],.reveal .slides>section[data-background-interactive]{pointer-events:none}.reveal.center,.reveal.center .slides,.reveal.center .slides section{min-height:0!important}.reveal .slides>section.future,.reveal .slides>section.past,.reveal .slides>section>section.future,.reveal .slides>section>section.past{pointer-events:none}.reveal.overview .slides>section,.reveal.overview .slides>section>section{pointer-events:auto}.reveal .slides>section.future,.reveal .slides>section.past,.reveal .slides>section>section.future,.reveal .slides>section>section.past{opacity:0}.reveal.slide section{-webkit-backface-visibility:hidden;backface-visibility:hidden}.reveal .slides>section[data-transition=slide].past,.reveal .slides>section[data-transition~=slide-out].past,.reveal.slide .slides>section:not([data-transition]).past{-webkit-transform:translate(-150%,0);transform:translate(-150%,0)}.reveal .slides>section[data-transition=slide].future,.reveal .slides>section[data-transition~=slide-in].future,.reveal.slide .slides>section:not([data-transition]).future{-webkit-transform:translate(150%,0);transform:translate(150%,0)}.reveal .slides>section>section[data-transition=slide].past,.reveal .slides>section>section[data-transition~=slide-out].past,.reveal.slide .slides>section>section:not([data-transition]).past{-webkit-transform:translate(0,-150%);transform:translate(0,-150%)}.reveal .slides>section>section[data-transition=slide].future,.reveal .slides>section>section[data-transition~=slide-in].future,.reveal.slide .slides>section>section:not([data-transition]).future{-webkit-transform:translate(0,150%);transform:translate(0,150%)}.reveal.linear section{-webkit-backface-visibility:hidden;backface-visibility:hidden}.reveal .slides>section[data-transition=linear].past,.reveal .slides>section[data-transition~=linear-out].past,.reveal.linear .slides>section:not([data-transition]).past{-webkit-transform:translate(-150%,0);transform:translate(-150%,0)}.reveal .slides>section[data-transition=linear].future,.reveal .slides>section[data-transition~=linear-in].future,.reveal.linear .slides>section:not([data-transition]).future{-webkit-transform:translate(150%,0);transform:translate(150%,0)}.reveal .slides>section>section[data-transition=linear].past,.reveal .slides>section>section[data-transition~=linear-out].past,.reveal.linear .slides>section>section:not([data-transition]).past{-webkit-transform:translate(0,-150%);transform:translate(0,-150%)}.reveal .slides>section>section[data-transition=linear].future,.reveal .slides>section>section[data-transition~=linear-in].future,.reveal.linear .slides>section>section:not([data-transition]).future{-webkit-transform:translate(0,150%);transform:translate(0,150%)}.reveal .slides section[data-transition=default].stack,.reveal.default .slides section.stack{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.reveal .slides>section[data-transition=default].past,.reveal .slides>section[data-transition~=default-out].past,.reveal.default .slides>section:not([data-transition]).past{-webkit-transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0);transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0)}.reveal .slides>section[data-transition=default].future,.reveal .slides>section[data-transition~=default-in].future,.reveal.default .slides>section:not([data-transition]).future{-webkit-transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0);transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0)}.reveal .slides>section>section[data-transition=default].past,.reveal .slides>section>section[data-transition~=default-out].past,.reveal.default .slides>section>section:not([data-transition]).past{-webkit-transform:translate3d(0,-300px,0) rotateX(70deg) translate3d(0,-300px,0);transform:translate3d(0,-300px,0) rotateX(70deg) translate3d(0,-300px,0)}.reveal .slides>section>section[data-transition=default].future,.reveal .slides>section>section[data-transition~=default-in].future,.reveal.default .slides>section>section:not([data-transition]).future{-webkit-transform:translate3d(0,300px,0) rotateX(-70deg) translate3d(0,300px,0);transform:translate3d(0,300px,0) rotateX(-70deg) translate3d(0,300px,0)}.reveal .slides section[data-transition=convex].stack,.reveal.convex .slides section.stack{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.reveal .slides>section[data-transition=convex].past,.reveal .slides>section[data-transition~=convex-out].past,.reveal.convex .slides>section:not([data-transition]).past{-webkit-transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0);transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0)}.reveal .slides>section[data-transition=convex].future,.reveal .slides>section[data-transition~=convex-in].future,.reveal.convex .slides>section:not([data-transition]).future{-webkit-transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0);transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0)}.reveal .slides>section>section[data-transition=convex].past,.reveal .slides>section>section[data-transition~=convex-out].past,.reveal.convex .slides>section>section:not([data-transition]).past{-webkit-transform:translate3d(0,-300px,0) rotateX(70deg) translate3d(0,-300px,0);transform:translate3d(0,-300px,0) rotateX(70deg) translate3d(0,-300px,0)}.reveal .slides>section>section[data-transition=convex].future,.reveal .slides>section>section[data-transition~=convex-in].future,.reveal.convex .slides>section>section:not([data-transition]).future{-webkit-transform:translate3d(0,300px,0) rotateX(-70deg) translate3d(0,300px,0);transform:translate3d(0,300px,0) rotateX(-70deg) translate3d(0,300px,0)}.reveal .slides section[data-transition=concave].stack,.reveal.concave .slides section.stack{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.reveal .slides>section[data-transition=concave].past,.reveal .slides>section[data-transition~=concave-out].past,.reveal.concave .slides>section:not([data-transition]).past{-webkit-transform:translate3d(-100%,0,0) rotateY(90deg) translate3d(-100%,0,0);transform:translate3d(-100%,0,0) rotateY(90deg) translate3d(-100%,0,0)}.reveal .slides>section[data-transition=concave].future,.reveal .slides>section[data-transition~=concave-in].future,.reveal.concave .slides>section:not([data-transition]).future{-webkit-transform:translate3d(100%,0,0) rotateY(-90deg) translate3d(100%,0,0);transform:translate3d(100%,0,0) rotateY(-90deg) translate3d(100%,0,0)}.reveal .slides>section>section[data-transition=concave].past,.reveal .slides>section>section[data-transition~=concave-out].past,.reveal.concave .slides>section>section:not([data-transition]).past{-webkit-transform:translate3d(0,-80%,0) rotateX(-70deg) translate3d(0,-80%,0);transform:translate3d(0,-80%,0) rotateX(-70deg) translate3d(0,-80%,0)}.reveal .slides>section>section[data-transition=concave].future,.reveal .slides>section>section[data-transition~=concave-in].future,.reveal.concave .slides>section>section:not([data-transition]).future{-webkit-transform:translate3d(0,80%,0) rotateX(70deg) translate3d(0,80%,0);transform:translate3d(0,80%,0) rotateX(70deg) translate3d(0,80%,0)}.reveal .slides section[data-transition=zoom],.reveal.zoom .slides section:not([data-transition]){transition-timing-function:ease}.reveal .slides>section[data-transition=zoom].past,.reveal .slides>section[data-transition~=zoom-out].past,.reveal.zoom .slides>section:not([data-transition]).past{visibility:hidden;-webkit-transform:scale(16);transform:scale(16)}.reveal .slides>section[data-transition=zoom].future,.reveal .slides>section[data-transition~=zoom-in].future,.reveal.zoom .slides>section:not([data-transition]).future{visibility:hidden;-webkit-transform:scale(.2);transform:scale(.2)}.reveal .slides>section>section[data-transition=zoom].past,.reveal .slides>section>section[data-transition~=zoom-out].past,.reveal.zoom .slides>section>section:not([data-transition]).past{-webkit-transform:translate(0,-150%);transform:translate(0,-150%)}.reveal .slides>section>section[data-transition=zoom].future,.reveal .slides>section>section[data-transition~=zoom-in].future,.reveal.zoom .slides>section>section:not([data-transition]).future{-webkit-transform:translate(0,150%);transform:translate(0,150%)}.reveal.cube .slides{-webkit-perspective:1300px;perspective:1300px}.reveal.cube .slides section{padding:30px;min-height:700px;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.reveal.center.cube .slides section{min-height:0}.reveal.cube .slides section:not(.stack):before{content:'';position:absolute;display:block;width:100%;height:100%;left:0;top:0;background:rgba(0,0,0,.1);border-radius:4px;-webkit-transform:translateZ(-20px);transform:translateZ(-20px)}.reveal.cube .slides section:not(.stack):after{content:'';position:absolute;display:block;width:90%;height:30px;left:5%;bottom:0;background:0 0;z-index:1;border-radius:4px;box-shadow:0 95px 25px rgba(0,0,0,.2);-webkit-transform:translateZ(-90px) rotateX(65deg);transform:translateZ(-90px) rotateX(65deg)}.reveal.cube .slides>section.stack{padding:0;background:0 0}.reveal.cube .slides>section.past{-webkit-transform-origin:100% 0;transform-origin:100% 0;-webkit-transform:translate3d(-100%,0,0) rotateY(-90deg);transform:translate3d(-100%,0,0) rotateY(-90deg)}.reveal.cube .slides>section.future{-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:translate3d(100%,0,0) rotateY(90deg);transform:translate3d(100%,0,0) rotateY(90deg)}.reveal.cube .slides>section>section.past{-webkit-transform-origin:0 100%;transform-origin:0 100%;-webkit-transform:translate3d(0,-100%,0) rotateX(90deg);transform:translate3d(0,-100%,0) rotateX(90deg)}.reveal.cube .slides>section>section.future{-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:translate3d(0,100%,0) rotateX(-90deg);transform:translate3d(0,100%,0) rotateX(-90deg)}.reveal.page .slides{-webkit-perspective-origin:0 50%;perspective-origin:0 50%;-webkit-perspective:3000px;perspective:3000px}.reveal.page .slides section{padding:30px;min-height:700px;box-sizing:border-box;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.reveal.page .slides section.past{z-index:12}.reveal.page .slides section:not(.stack):before{content:'';position:absolute;display:block;width:100%;height:100%;left:0;top:0;background:rgba(0,0,0,.1);-webkit-transform:translateZ(-20px);transform:translateZ(-20px)}.reveal.page .slides section:not(.stack):after{content:'';position:absolute;display:block;width:90%;height:30px;left:5%;bottom:0;background:0 0;z-index:1;border-radius:4px;box-shadow:0 95px 25px rgba(0,0,0,.2);-webkit-transform:translateZ(-90px) rotateX(65deg)}.reveal.page .slides>section.stack{padding:0;background:0 0}.reveal.page .slides>section.past{-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:translate3d(-40%,0,0) rotateY(-80deg);transform:translate3d(-40%,0,0) rotateY(-80deg)}.reveal.page .slides>section.future{-webkit-transform-origin:100% 0;transform-origin:100% 0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.reveal.page .slides>section>section.past{-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-transform:translate3d(0,-40%,0) rotateX(80deg);transform:translate3d(0,-40%,0) rotateX(80deg)}.reveal.page .slides>section>section.future{-webkit-transform-origin:0 100%;transform-origin:0 100%;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.reveal .slides section[data-transition=fade],.reveal.fade .slides section:not([data-transition]),.reveal.fade .slides>section>section:not([data-transition]){-webkit-transform:none;transform:none;transition:opacity .5s}.reveal.fade.overview .slides section,.reveal.fade.overview .slides>section>section{transition:none}.reveal .slides section[data-transition=none],.reveal.none .slides section:not([data-transition]){-webkit-transform:none;transform:none;transition:none}.reveal .pause-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;visibility:hidden;opacity:0;z-index:100;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:0 0;cursor:pointer}.reveal .pause-overlay .resume-button:hover{color:#fff;border-color:#fff}.reveal.paused .pause-overlay{visibility:visible;opacity:1}.no-transforms{overflow-y:auto}.no-transforms .reveal .slides{position:relative;width:80%;height:auto!important;top:0;left:50%;margin:0;text-align:center}.no-transforms .reveal .controls,.no-transforms .reveal .progress{display:none!important}.no-transforms .reveal .slides section{display:block!important;opacity:1!important;position:relative!important;height:auto;min-height:0;top:0;left:-50%;margin:70px 0;-webkit-transform:none;transform:none}.no-transforms .reveal .slides section section{left:0}.reveal .no-transition,.reveal .no-transition *{transition:none!important}.reveal .backgrounds{position:absolute;width:100%;height:100%;top:0;left:0;-webkit-perspective:600px;perspective:600px}.reveal .slide-background{display:none;position:absolute;width:100%;height:100%;opacity:0;visibility:hidden;overflow:hidden;background-color:transparent;transition:all .8s cubic-bezier(.26,.86,.44,.985)}.reveal .slide-background-content{position:absolute;width:100%;height:100%;background-position:50% 50%;background-repeat:no-repeat;background-size:cover}.reveal .slide-background.stack{display:block}.reveal .slide-background.present{opacity:1;visibility:visible;z-index:2}.print-pdf .reveal .slide-background{opacity:1!important;visibility:visible!important}.reveal .slide-background video{position:absolute;width:100%;height:100%;max-width:none;max-height:none;top:0;left:0;-o-object-fit:cover;object-fit:cover}.reveal .slide-background[data-background-size=contain] video{-o-object-fit:contain;object-fit:contain}.reveal>.backgrounds .slide-background[data-background-transition=none],.reveal[data-background-transition=none]>.backgrounds .slide-background{transition:none}.reveal>.backgrounds .slide-background[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background{opacity:1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.reveal>.backgrounds .slide-background.past[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background.past{-webkit-transform:translate(-100%,0);transform:translate(-100%,0)}.reveal>.backgrounds .slide-background.future[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background.future{-webkit-transform:translate(100%,0);transform:translate(100%,0)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background>.slide-background.past{-webkit-transform:translate(0,-100%);transform:translate(0,-100%)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=slide],.reveal[data-background-transition=slide]>.backgrounds .slide-background>.slide-background.future{-webkit-transform:translate(0,100%);transform:translate(0,100%)}.reveal>.backgrounds .slide-background.past[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background.past{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0);transform:translate3d(-100%,0,0) rotateY(-90deg) translate3d(-100%,0,0)}.reveal>.backgrounds .slide-background.future[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background.future{opacity:0;-webkit-transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0);transform:translate3d(100%,0,0) rotateY(90deg) translate3d(100%,0,0)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background>.slide-background.past{opacity:0;-webkit-transform:translate3d(0,-100%,0) rotateX(90deg) translate3d(0,-100%,0);transform:translate3d(0,-100%,0) rotateX(90deg) translate3d(0,-100%,0)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=convex],.reveal[data-background-transition=convex]>.backgrounds .slide-background>.slide-background.future{opacity:0;-webkit-transform:translate3d(0,100%,0) rotateX(-90deg) translate3d(0,100%,0);transform:translate3d(0,100%,0) rotateX(-90deg) translate3d(0,100%,0)}.reveal>.backgrounds .slide-background.past[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background.past{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotateY(90deg) translate3d(-100%,0,0);transform:translate3d(-100%,0,0) rotateY(90deg) translate3d(-100%,0,0)}.reveal>.backgrounds .slide-background.future[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background.future{opacity:0;-webkit-transform:translate3d(100%,0,0) rotateY(-90deg) translate3d(100%,0,0);transform:translate3d(100%,0,0) rotateY(-90deg) translate3d(100%,0,0)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background>.slide-background.past{opacity:0;-webkit-transform:translate3d(0,-100%,0) rotateX(-90deg) translate3d(0,-100%,0);transform:translate3d(0,-100%,0) rotateX(-90deg) translate3d(0,-100%,0)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=concave],.reveal[data-background-transition=concave]>.backgrounds .slide-background>.slide-background.future{opacity:0;-webkit-transform:translate3d(0,100%,0) rotateX(90deg) translate3d(0,100%,0);transform:translate3d(0,100%,0) rotateX(90deg) translate3d(0,100%,0)}.reveal>.backgrounds .slide-background[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background{transition-timing-function:ease}.reveal>.backgrounds .slide-background.past[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background.past{opacity:0;visibility:hidden;-webkit-transform:scale(16);transform:scale(16)}.reveal>.backgrounds .slide-background.future[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background.future{opacity:0;visibility:hidden;-webkit-transform:scale(.2);transform:scale(.2)}.reveal>.backgrounds .slide-background>.slide-background.past[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background>.slide-background.past{opacity:0;visibility:hidden;-webkit-transform:scale(16);transform:scale(16)}.reveal>.backgrounds .slide-background>.slide-background.future[data-background-transition=zoom],.reveal[data-background-transition=zoom]>.backgrounds .slide-background>.slide-background.future{opacity:0;visibility:hidden;-webkit-transform:scale(.2);transform:scale(.2)}.reveal[data-transition-speed=fast]>.backgrounds .slide-background{transition-duration:.4s}.reveal[data-transition-speed=slow]>.backgrounds .slide-background{transition-duration:1.2s}.reveal.overview{-webkit-perspective-origin:50% 50%;perspective-origin:50% 50%;-webkit-perspective:700px;perspective:700px}.reveal.overview .slides{-moz-transform-style:preserve-3d}.reveal.overview .slides section{height:100%;top:0!important;opacity:1!important;overflow:hidden;visibility:visible!important;cursor:pointer;box-sizing:border-box}.reveal.overview .slides section.present,.reveal.overview .slides section:hover{outline:10px solid rgba(150,150,150,.4);outline-offset:10px}.reveal.overview .slides section .fragment{opacity:1;transition:none}.reveal.overview .slides section:after,.reveal.overview .slides section:before{display:none!important}.reveal.overview .slides>section.stack{padding:0;top:0!important;background:0 0;outline:0;overflow:visible}.reveal.overview .backgrounds{-webkit-perspective:inherit;perspective:inherit;-moz-transform-style:preserve-3d}.reveal.overview .backgrounds .slide-background{opacity:1;visibility:visible;outline:10px solid rgba(150,150,150,.1);outline-offset:10px}.reveal.overview .backgrounds .slide-background.stack{overflow:visible}.reveal.overview .slides section,.reveal.overview-deactivating .slides section{transition:none}.reveal.overview .backgrounds .slide-background,.reveal.overview-deactivating .backgrounds .slide-background{transition:none}.reveal.rtl .slides,.reveal.rtl .slides h1,.reveal.rtl .slides h2,.reveal.rtl .slides h3,.reveal.rtl .slides h4,.reveal.rtl .slides h5,.reveal.rtl .slides h6{direction:rtl;font-family:sans-serif}.reveal.rtl code,.reveal.rtl pre{direction:ltr}.reveal.rtl ol,.reveal.rtl ul{text-align:right}.reveal.rtl .progress span{float:right}.reveal.has-parallax-background .backgrounds{transition:all .8s ease}.reveal.has-parallax-background[data-transition-speed=fast] .backgrounds{transition-duration:.4s}.reveal.has-parallax-background[data-transition-speed=slow] .backgrounds{transition-duration:1.2s}.reveal .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1000;background:rgba(0,0,0,.9);opacity:0;visibility:hidden;transition:all .3s ease}.reveal .overlay.visible{opacity:1;visibility:visible}.reveal .overlay .spinner{position:absolute;display:block;top:50%;left:50%;width:32px;height:32px;margin:-16px 0 0 -16px;z-index:10;background-image:url(data:image/gif;base64,R0lGODlhIAAgAPMAAJmZmf%2F%2F%2F6%2Bvr8nJybW1tcDAwOjo6Nvb26ioqKOjo7Ozs%2FLy8vz8%2FAAAAAAAAAAAACH%2FC05FVFNDQVBFMi4wAwEAAAAh%2FhpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh%2BQQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ%2FV%2FnmOM82XiHRLYKhKP1oZmADdEAAAh%2BQQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY%2FCZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB%2BA4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6%2BHo7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq%2BB6QDtuetcaBPnW6%2BO7wDHpIiK9SaVK5GgV543tzjgGcghAgAh%2BQQJCgAAACwAAAAAIAAgAAAE7hDISSkxpOrN5zFHNWRdhSiVoVLHspRUMoyUakyEe8PTPCATW9A14E0UvuAKMNAZKYUZCiBMuBakSQKG8G2FzUWox2AUtAQFcBKlVQoLgQReZhQlCIJesQXI5B0CBnUMOxMCenoCfTCEWBsJColTMANldx15BGs8B5wlCZ9Po6OJkwmRpnqkqnuSrayqfKmqpLajoiW5HJq7FL1Gr2mMMcKUMIiJgIemy7xZtJsTmsM4xHiKv5KMCXqfyUCJEonXPN2rAOIAmsfB3uPoAK%2B%2BG%2Bw48edZPK%2BM6hLJpQg484enXIdQFSS1u6UhksENEQAAIfkECQoAAAAsAAAAACAAIAAABOcQyEmpGKLqzWcZRVUQnZYg1aBSh2GUVEIQ2aQOE%2BG%2BcD4ntpWkZQj1JIiZIogDFFyHI0UxQwFugMSOFIPJftfVAEoZLBbcLEFhlQiqGp1Vd140AUklUN3eCA51C1EWMzMCezCBBmkxVIVHBWd3HHl9JQOIJSdSnJ0TDKChCwUJjoWMPaGqDKannasMo6WnM562R5YluZRwur0wpgqZE7NKUm%2BFNRPIhjBJxKZteWuIBMN4zRMIVIhffcgojwCF117i4nlLnY5ztRLsnOk%2BaV%2BoJY7V7m76PdkS4trKcdg0Zc0tTcKkRAAAIfkECQoAAAAsAAAAACAAIAAABO4QyEkpKqjqzScpRaVkXZWQEximw1BSCUEIlDohrft6cpKCk5xid5MNJTaAIkekKGQkWyKHkvhKsR7ARmitkAYDYRIbUQRQjWBwJRzChi9CRlBcY1UN4g0%2FVNB0AlcvcAYHRyZPdEQFYV8ccwR5HWxEJ02YmRMLnJ1xCYp0Y5idpQuhopmmC2KgojKasUQDk5BNAwwMOh2RtRq5uQuPZKGIJQIGwAwGf6I0JXMpC8C7kXWDBINFMxS4DKMAWVWAGYsAdNqW5uaRxkSKJOZKaU3tPOBZ4DuK2LATgJhkPJMgTwKCdFjyPHEnKxFCDhEAACH5BAkKAAAALAAAAAAgACAAAATzEMhJaVKp6s2nIkolIJ2WkBShpkVRWqqQrhLSEu9MZJKK9y1ZrqYK9WiClmvoUaF8gIQSNeF1Er4MNFn4SRSDARWroAIETg1iVwuHjYB1kYc1mwruwXKC9gmsJXliGxc%2BXiUCby9ydh1sOSdMkpMTBpaXBzsfhoc5l58Gm5yToAaZhaOUqjkDgCWNHAULCwOLaTmzswadEqggQwgHuQsHIoZCHQMMQgQGubVEcxOPFAcMDAYUA85eWARmfSRQCdcMe0zeP1AAygwLlJtPNAAL19DARdPzBOWSm1brJBi45soRAWQAAkrQIykShQ9wVhHCwCQCACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiRMDjI0Fd30%2FiI2UA5GSS5UDj2l6NoqgOgN4gksEBgYFf0FDqKgHnyZ9OX8HrgYHdHpcHQULXAS2qKpENRg7eAMLC7kTBaixUYFkKAzWAAnLC7FLVxLWDBLKCwaKTULgEwbLA4hJtOkSBNqITT3xEgfLpBtzE%2FjiuL04RGEBgwWhShRgQExHBAAh%2BQQJCgAAACwAAAAAIAAgAAAE7xDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfZiCqGk5dTESJeaOAlClzsJsqwiJwiqnFrb2nS9kmIcgEsjQydLiIlHehhpejaIjzh9eomSjZR%2BipslWIRLAgMDOR2DOqKogTB9pCUJBagDBXR6XB0EBkIIsaRsGGMMAxoDBgYHTKJiUYEGDAzHC9EACcUGkIgFzgwZ0QsSBcXHiQvOwgDdEwfFs0sDzt4S6BK4xYjkDOzn0unFeBzOBijIm1Dgmg5YFQwsCMjp1oJ8LyIAACH5BAkKAAAALAAAAAAgACAAAATwEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GGl6NoiPOH16iZKNlH6KmyWFOggHhEEvAwwMA0N9GBsEC6amhnVcEwavDAazGwIDaH1ipaYLBUTCGgQDA8NdHz0FpqgTBwsLqAbWAAnIA4FWKdMLGdYGEgraigbT0OITBcg5QwPT4xLrROZL6AuQAPUS7bxLpoWidY0JtxLHKhwwMJBTHgPKdEQAACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq%2BE71SRQeyqUToLA7VxF0JDyIQh%2FMVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GAULDJCRiXo1CpGXDJOUjY%2BYip9DhToJA4RBLwMLCwVDfRgbBAaqqoZ1XBMHswsHtxtFaH1iqaoGNgAIxRpbFAgfPQSqpbgGBqUD1wBXeCYp1AYZ19JJOYgH1KwA4UBvQwXUBxPqVD9L3sbp2BNk2xvvFPJd%2BMFCN6HAAIKgNggY0KtEBAAh%2BQQJCgAAACwAAAAAIAAgAAAE6BDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfYIDMaAFdTESJeaEDAIMxYFqrOUaNW4E4ObYcCXaiBVEgULe0NJaxxtYksjh2NLkZISgDgJhHthkpU4mW6blRiYmZOlh4JWkDqILwUGBnE6TYEbCgevr0N1gH4At7gHiRpFaLNrrq8HNgAJA70AWxQIH1%2BvsYMDAzZQPC9VCNkDWUhGkuE5PxJNwiUK4UfLzOlD4WvzAHaoG9nxPi5d%2BjYUqfAhhykOFwJWiAAAIfkECQoAAAAsAAAAACAAIAAABPAQyElpUqnqzaciSoVkXVUMFaFSwlpOCcMYlErAavhOMnNLNo8KsZsMZItJEIDIFSkLGQoQTNhIsFehRww2CQLKF0tYGKYSg%2BygsZIuNqJksKgbfgIGepNo2cIUB3V1B3IvNiBYNQaDSTtfhhx0CwVPI0UJe0%2Bbm4g5VgcGoqOcnjmjqDSdnhgEoamcsZuXO1aWQy8KAwOAuTYYGwi7w5h%2BKr0SJ8MFihpNbx%2B4Erq7BYBuzsdiH1jCAzoSfl0rVirNbRXlBBlLX%2BBP0XJLAPGzTkAuAOqb0WT5AH7OcdCm5B8TgRwSRKIHQtaLCwg1RAAAOwAAAAAAAAAAAA%3D%3D);visibility:visible;opacity:.6;transition:all .3s ease}.reveal .overlay header{position:absolute;left:0;top:0;width:100%;height:40px;z-index:2;border-bottom:1px solid #222}.reveal .overlay header a{display:inline-block;width:40px;height:40px;line-height:36px;padding:0 10px;float:right;opacity:.6;box-sizing:border-box}.reveal .overlay header a:hover{opacity:1}.reveal .overlay header a .icon{display:inline-block;width:20px;height:20px;background-position:50% 50%;background-size:100%;background-repeat:no-repeat}.reveal .overlay header a.close .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC)}.reveal .overlay header a.external .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==)}.reveal .overlay .viewport{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;top:40px;right:0;bottom:0;left:0}.reveal .overlay.overlay-preview .viewport iframe{width:100%;height:100%;max-width:100%;max-height:100%;border:0;opacity:0;visibility:hidden;transition:all .3s ease}.reveal .overlay.overlay-preview.loaded .viewport iframe{opacity:1;visibility:visible}.reveal .overlay.overlay-preview.loaded .viewport-inner{position:absolute;z-index:-1;left:0;top:45%;width:100%;text-align:center;letter-spacing:normal}.reveal .overlay.overlay-preview .x-frame-error{opacity:0;transition:opacity .3s ease .3s}.reveal .overlay.overlay-preview.loaded .x-frame-error{opacity:1}.reveal .overlay.overlay-preview.loaded .spinner{opacity:0;visibility:hidden;-webkit-transform:scale(.2);transform:scale(.2)}.reveal .overlay.overlay-help .viewport{overflow:auto;color:#fff}.reveal .overlay.overlay-help .viewport .viewport-inner{width:600px;margin:auto;padding:20px 20px 80px 20px;text-align:center;letter-spacing:normal}.reveal .overlay.overlay-help .viewport .viewport-inner .title{font-size:20px}.reveal .overlay.overlay-help .viewport .viewport-inner table{border:1px solid #fff;border-collapse:collapse;font-size:16px}.reveal .overlay.overlay-help .viewport .viewport-inner table td,.reveal .overlay.overlay-help .viewport .viewport-inner table th{width:200px;padding:14px;border:1px solid #fff;vertical-align:middle}.reveal .overlay.overlay-help .viewport .viewport-inner table th{padding-top:20px;padding-bottom:20px}.reveal .playback{position:absolute;left:15px;bottom:20px;z-index:30;cursor:pointer;transition:all .4s ease;-webkit-tap-highlight-color:transparent}.reveal.overview .playback{opacity:0;visibility:hidden}.reveal .roll{display:inline-block;line-height:1.2;overflow:hidden;vertical-align:top;-webkit-perspective:400px;perspective:400px;-webkit-perspective-origin:50% 50%;perspective-origin:50% 50%}.reveal .roll:hover{background:0 0;text-shadow:none}.reveal .roll span{display:block;position:relative;padding:0 2px;pointer-events:none;transition:all .4s ease;-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden}.reveal .roll:hover span{background:rgba(0,0,0,.5);-webkit-transform:translate3d(0,0,-45px) rotateX(90deg);transform:translate3d(0,0,-45px) rotateX(90deg)}.reveal .roll span:after{content:attr(data-title);display:block;position:absolute;left:0;top:0;padding:0 2px;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-origin:50% 0;transform-origin:50% 0;-webkit-transform:translate3d(0,110%,0) rotateX(-90deg);transform:translate3d(0,110%,0) rotateX(-90deg)}.reveal aside.notes{display:none}.reveal .speaker-notes{display:none;position:absolute;width:25vw;height:100%;top:0;left:100%;padding:14px 18px 14px 18px;z-index:1;font-size:18px;line-height:1.4;border:1px solid rgba(0,0,0,.05);color:#222;background-color:#f5f5f5;overflow:auto;box-sizing:border-box;text-align:left;font-family:Helvetica,sans-serif;-webkit-overflow-scrolling:touch}.reveal .speaker-notes .notes-placeholder{color:#ccc;font-style:italic}.reveal .speaker-notes:focus{outline:0}.reveal .speaker-notes:before{content:'Speaker notes';display:block;margin-bottom:10px;opacity:.5}.reveal.show-notes{max-width:75vw;overflow:visible}.reveal.show-notes .speaker-notes{display:block}@media screen and (min-width:1600px){.reveal .speaker-notes{font-size:20px}}@media screen and (max-width:1024px){.reveal.show-notes{border-left:0;max-width:none;max-height:70%;overflow:visible}.reveal.show-notes .speaker-notes{top:100%;left:0;width:100%;height:42.8571428571%}}@media screen and (max-width:600px){.reveal.show-notes{max-height:60%}.reveal.show-notes .speaker-notes{top:100%;height:66.6666666667%}.reveal .speaker-notes{font-size:14px}}.zoomed .reveal *,.zoomed .reveal :after,.zoomed .reveal :before{-webkit-backface-visibility:visible!important;backface-visibility:visible!important}.zoomed .reveal .controls,.zoomed .reveal .progress{opacity:0}.zoomed .reveal .roll span{background:0 0}.zoomed .reveal .roll span:after{visibility:hidden} \ No newline at end of file diff --git a/css/reveal.scss b/css/reveal.scss index 8f5ac5b4..e6608d4e 100644 --- a/css/reveal.scss +++ b/css/reveal.scss @@ -1,9 +1,9 @@ /*! * reveal.js - * http://lab.hakim.se/reveal-js + * http://revealjs.com * 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 { opacity: 0; 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-current-red, .reveal .slides section .fragment.highlight-green, @@ -540,7 +556,7 @@ $controlsArrowAngleActive: 36deg; *********************************************/ .reveal .slide-number { - position: fixed; + position: absolute; display: block; right: 8px; bottom: 8px; @@ -553,6 +569,10 @@ $controlsArrowAngleActive: 36deg; padding: 5px; } +.reveal .slide-number a { + color: currentColor; +} + .reveal .slide-number-delimiter { margin: 0 3px; } @@ -636,6 +656,7 @@ $controlsArrowAngleActive: 36deg; .reveal .slides>section.stack { padding-top: 0; padding-bottom: 0; + pointer-events: none; } .reveal .slides>section.present, @@ -1013,6 +1034,25 @@ $controlsArrowAngleActive: 36deg; z-index: 100; 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 { visibility: visible; opacity: 1; @@ -1086,11 +1126,18 @@ $controlsArrowAngleActive: 36deg; overflow: hidden; 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-repeat: no-repeat; background-size: cover; - - transition: all 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); } .reveal .slide-background.stack { diff --git a/css/theme/README.md b/css/theme/README.md index 1bca1214..8ae164bb 100644 --- a/css/theme/README.md +++ b/css/theme/README.md @@ -4,7 +4,7 @@ Themes are written using Sass to keep things modular and reduce the need for rep ## 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: diff --git a/css/theme/beige.css b/css/theme/beige.css index d2d0ca6e..fb5f1373 100644 --- a/css/theme/beige.css +++ b/css/theme/beige.css @@ -34,8 +34,8 @@ body { background: rgba(79, 64, 28, 0.99); text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -193,10 +193,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -266,3 +268,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #f7f3de; } } diff --git a/css/theme/black.css b/css/theme/black.css index 83f6eee1..dec6385b 100644 --- a/css/theme/black.css +++ b/css/theme/black.css @@ -30,8 +30,8 @@ body { background: #bee4fd; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -189,10 +189,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -262,3 +264,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #222; } } diff --git a/css/theme/blood.css b/css/theme/blood.css index 30e4b099..15e6c207 100644 --- a/css/theme/blood.css +++ b/css/theme/blood.css @@ -33,8 +33,8 @@ body { background: #a23; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -192,10 +192,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -266,6 +268,13 @@ body { -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); } +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #222; } } + .reveal p { font-weight: 300; text-shadow: 1px 1px #222; } diff --git a/css/theme/league.css b/css/theme/league.css index e35d668e..9dfa2ce8 100644 --- a/css/theme/league.css +++ b/css/theme/league.css @@ -36,8 +36,8 @@ body { background: #FF5E99; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -195,10 +195,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -268,3 +270,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #2b2b2b; } } diff --git a/css/theme/moon.css b/css/theme/moon.css index c7705d94..52b3f67b 100644 --- a/css/theme/moon.css +++ b/css/theme/moon.css @@ -34,8 +34,8 @@ body { background: #d33682; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -193,10 +193,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -266,3 +268,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #002b36; } } diff --git a/css/theme/night.css b/css/theme/night.css index 5aca9c04..51a3dd34 100644 --- a/css/theme/night.css +++ b/css/theme/night.css @@ -28,8 +28,8 @@ body { background: #e7ad52; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -187,10 +187,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -260,3 +262,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #111; } } diff --git a/css/theme/serif.css b/css/theme/serif.css index 72298a91..ea01066e 100644 --- a/css/theme/serif.css +++ b/css/theme/serif.css @@ -30,8 +30,8 @@ body { background: #26351C; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -189,10 +189,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -262,3 +264,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #F0F1EB; } } diff --git a/css/theme/simple.css b/css/theme/simple.css index 40d12382..8432d84b 100644 --- a/css/theme/simple.css +++ b/css/theme/simple.css @@ -33,8 +33,8 @@ body { background: rgba(0, 0, 0, 0.99); text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -192,10 +192,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -265,3 +267,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #fff; } } diff --git a/css/theme/sky.css b/css/theme/sky.css index f4b0ad59..6f60a1d9 100644 --- a/css/theme/sky.css +++ b/css/theme/sky.css @@ -37,8 +37,8 @@ body { background: #134674; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -196,10 +196,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -269,3 +271,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #f7fbfc; } } diff --git a/css/theme/solarized.css b/css/theme/solarized.css index 3affa6e1..fe81f09d 100644 --- a/css/theme/solarized.css +++ b/css/theme/solarized.css @@ -34,8 +34,8 @@ body { background: #d33682; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -193,10 +193,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -266,3 +268,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #fdf6e3; } } diff --git a/css/theme/template/theme.scss b/css/theme/template/theme.scss index 58dc7274..a8f142d3 100644 --- a/css/theme/template/theme.scss +++ b/css/theme/template/theme.scss @@ -28,8 +28,8 @@ body { text-shadow: none; } -.reveal .slides>section, -.reveal .slides>section>section { +.reveal .slides section, +.reveal .slides section>section { line-height: 1.3; font-weight: inherit; } @@ -217,9 +217,11 @@ body { .reveal sup { vertical-align: super; + font-size: smaller; } .reveal sub { vertical-align: sub; + font-size: smaller; } .reveal small { @@ -310,7 +312,14 @@ body { .reveal .progress span { -webkit-transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); -moz-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); + transition: width 800ms cubic-bezier(0.260, 0.860, 0.440, 0.985); } - +/********************************************* + * PRINT BACKGROUND + *********************************************/ + @media print { + .backgrounds { + background-color: $backgroundColor; + } +} diff --git a/css/theme/white.css b/css/theme/white.css index edc5a607..27e44a1b 100644 --- a/css/theme/white.css +++ b/css/theme/white.css @@ -30,8 +30,8 @@ body { background: #98bdef; text-shadow: none; } -.reveal .slides > section, -.reveal .slides > section > section { +.reveal .slides section, +.reveal .slides section > section { line-height: 1.3; font-weight: inherit; } @@ -189,10 +189,12 @@ body { border-bottom: none; } .reveal sup { - vertical-align: super; } + vertical-align: super; + font-size: smaller; } .reveal sub { - vertical-align: sub; } + vertical-align: sub; + font-size: smaller; } .reveal small { display: inline-block; @@ -262,3 +264,10 @@ body { -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); transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } + +/********************************************* + * PRINT BACKGROUND + *********************************************/ +@media print { + .backgrounds { + background-color: #fff; } } diff --git a/js/reveal.js b/js/reveal.js index 50e580ef..3c31b973 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,9 +1,9 @@ /*! * reveal.js - * http://lab.hakim.se/reveal-js + * http://revealjs.com * MIT licensed * - * Copyright (C) 2017 Hakim El Hattab, http://hakim.se + * Copyright (C) 2018 Hakim El Hattab, http://hakim.se */ (function( root, factory ) { if( typeof define === 'function' && define.amd ) { @@ -26,7 +26,7 @@ var Reveal; // The reveal.js version - var VERSION = '3.6.0'; + var VERSION = '3.7.0'; var SLIDES_SELECTOR = '.slides section', HORIZONTAL_SLIDES_SELECTOR = '.slides>section', @@ -69,6 +69,10 @@ // Display the page number of the current slide 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 showSlideNumber: 'all', @@ -84,6 +88,10 @@ // Enable the slide overview mode overview: true, + // Disables the default reveal.js slide layout so that you can use + // custom CSS layout + disableLayout: false, + // Vertical centering of slides center: true, @@ -102,6 +110,10 @@ // Turns fragments on and off globally 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, // i.e. contained within a limited portion of the screen embedded: false, @@ -135,6 +147,11 @@ // Use this method for navigation when auto-sliding (defaults to navigateNext) 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 mouseWheel: false, @@ -145,6 +162,8 @@ hideAddressBar: true, // Opens links in an iframe preview overlay + // Add `data-preview-link` and `data-preview-link="false"` to customise each link + // individually previewLinks: false, // Exposes the reveal.js API through window.postMessage @@ -171,6 +190,12 @@ // Parallax background size 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 parallaxBackgroundHorizontal: null, parallaxBackgroundVertical: null, @@ -179,6 +204,9 @@ // to PDF, unlimited by default 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. // This exists to account for environment differences based on how you // print to PDF. CLI printing options, like phantomjs and wkpdf, can end @@ -289,7 +317,10 @@ 'B , .': 'Pause', 'F': 'Fullscreen', 'ESC, O': 'Slide overview' - }; + }, + + // Holds custom key code mappings + registeredKeyBindings = {}; /** * Starts up the presentation if the client is capable. @@ -391,13 +422,13 @@ } - /** - * Loads the dependencies of reveal.js. Dependencies are - * defined via the configuration option 'dependencies' - * and will be loaded prior to starting/binding reveal.js. - * Some dependencies may have an 'async' flag, if so they - * will load after reveal.js has been started up. - */ + /** + * Loads the dependencies of reveal.js. Dependencies are + * defined via the configuration option 'dependencies' + * and will be loaded prior to starting/binding reveal.js. + * Some dependencies may have an 'async' flag, if so they + * will load after reveal.js has been started up. + */ function load() { var scripts = [], @@ -415,7 +446,7 @@ } 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 if( typeof s.callback === 'function' ) { s.callback.apply( this ); @@ -562,7 +593,8 @@ dom.speakerNotes.setAttribute( 'tabindex', '0' ); // Overlay graphic which is displayed during the paused mode - createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null ); + dom.pauseOverlay = createSingletonNode( dom.wrapper, 'div', 'pause-overlay', '' ); + dom.resumeButton = dom.pauseOverlay.querySelector( '.resume-button' ); dom.wrapper.setAttribute( 'role', 'application' ); @@ -759,15 +791,60 @@ numberElement.innerHTML = formatSlideNumber( slideNumberH, '.', slideNumberV ); 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 + else { + toArray( page.querySelectorAll( '.fragment:not(.fade-out)' ) ).forEach( function( fragment ) { + fragment.classList.add( 'visible' ); + } ); + } + } } ); - // Show all fragments - toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' .fragment' ) ).forEach( function( fragment ) { - fragment.classList.add( 'visible' ); - } ); - // Notify subscribers that the PDF layout is good to go dispatchEvent( 'pdf-ready' ); @@ -865,6 +942,8 @@ dom.background.style.backgroundImage = 'url("' + config.parallaxBackgroundImage + '")'; 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 // needed for proper transitions to be set on the element via CSS. To remove @@ -894,6 +973,57 @@ */ 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 = { background: slide.getAttribute( 'data-background' ), backgroundSize: slide.getAttribute( 'data-background-size' ), @@ -903,17 +1033,13 @@ backgroundColor: slide.getAttribute( 'data-background-color' ), backgroundRepeat: slide.getAttribute( 'data-background-repeat' ), 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 ) { // 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 ); } else { @@ -933,24 +1059,20 @@ data.backgroundColor + data.backgroundRepeat + data.backgroundPosition + - data.backgroundTransition ); + data.backgroundTransition + + data.backgroundOpacity ); } // 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.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 ); - container.appendChild( element ); - - // If backgrounds are being recreated, clear old classes - slide.classList.remove( 'has-dark-background' ); - slide.classList.remove( 'has-light-background' ); - - slide.slideBackgroundElement = element; + // Background image options are set on the content wrapper + if( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize; + if( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat; + if( data.backgroundPosition ) contentElement.style.backgroundPosition = data.backgroundPosition; + if( data.backgroundOpacity ) contentElement.style.opacity = data.backgroundOpacity; // If this slide has a background color, add a class that // 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 ); if( config.touch ) { - dom.wrapper.addEventListener( 'touchstart', onTouchStart, false ); - dom.wrapper.addEventListener( 'touchmove', onTouchMove, false ); - 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 + if( 'onpointerdown' in window ) { + // Use W3C pointer events dom.wrapper.addEventListener( 'pointerdown', onPointerDown, false ); dom.wrapper.addEventListener( 'pointermove', onPointerMove, false ); dom.wrapper.addEventListener( 'pointerup', onPointerUp, false ); @@ -1167,6 +1282,12 @@ dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, 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 ) { @@ -1178,6 +1299,8 @@ dom.progress.addEventListener( 'click', onProgressClicked, false ); } + dom.resumeButton.addEventListener( 'click', resume, false ); + if( config.focusBodyOnPageVisibilityChange ) { var visibilityChange; @@ -1229,22 +1352,19 @@ window.removeEventListener( 'hashchange', onWindowHashChange, 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( 'touchmove', onTouchMove, false ); dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false ); - // IE11 - 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 ); - } + dom.resumeButton.removeEventListener( 'click', resume, false ); if ( config.progress && dom.progress ) { 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. * 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. */ @@ -1748,6 +1909,13 @@ html += '' + key + '' + keyboardShortcuts[ key ] + ''; } + // Add custom key bindings that have associated descriptions + for( var binding in registeredKeyBindings ) { + if( registeredKeyBindings[binding].key && registeredKeyBindings[binding].description ) { + html += '' + registeredKeyBindings[binding].key + '' + registeredKeyBindings[binding].description + ''; + } + } + html += ''; dom.overlay.innerHTML = [ @@ -1792,76 +1960,80 @@ if( dom.wrapper && !isPrintingPDF() ) { - var size = getComputedSlideSize(); + if( !config.disableLayout ) { - // Layout the contents of the slides - layoutSlideContents( config.width, config.height ); + var size = getComputedSlideSize(); - dom.slides.style.width = size.width + 'px'; - dom.slides.style.height = size.height + 'px'; + // Layout the contents of the slides + layoutSlideContents( config.width, config.height ); - // Determine scale of content to fit within available space - scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); + dom.slides.style.width = size.width + 'px'; + dom.slides.style.height = size.height + 'px'; - // Respect max/min scale settings - scale = Math.max( scale, config.minScale ); - scale = Math.min( scale, config.maxScale ); + // Determine scale of content to fit within available space + scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height ); - // Don't apply any scaling styles if scale is 1 - if( scale === 1 ) { - dom.slides.style.zoom = ''; - dom.slides.style.left = ''; - dom.slides.style.top = ''; - dom.slides.style.bottom = ''; - dom.slides.style.right = ''; - transformSlides( { layout: '' } ); - } - else { - // Prefer zoom for scaling up so that content remains crisp. - // Don't use zoom to scale down since that can lead to shifts - // in text layout/line breaks. - if( scale > 1 && features.zoom ) { - dom.slides.style.zoom = scale; + // Respect max/min scale settings + scale = Math.max( scale, config.minScale ); + scale = Math.min( scale, config.maxScale ); + + // Don't apply any scaling styles if scale is 1 + if( scale === 1 ) { + dom.slides.style.zoom = ''; dom.slides.style.left = ''; dom.slides.style.top = ''; dom.slides.style.bottom = ''; dom.slides.style.right = ''; transformSlides( { layout: '' } ); } - // Apply scale transform as a fallback else { - dom.slides.style.zoom = ''; - dom.slides.style.left = '50%'; - dom.slides.style.top = '50%'; - dom.slides.style.bottom = 'auto'; - dom.slides.style.right = 'auto'; - transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } ); - } - } - - // Select all slides, vertical and horizontal - var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ); - - for( var i = 0, len = slides.length; i < len; i++ ) { - var slide = slides[ i ]; - - // Don't bother updating invisible slides - if( slide.style.display === 'none' ) { - continue; + // Prefer zoom for scaling up so that content remains crisp. + // Don't use zoom to scale down since that can lead to shifts + // in text layout/line breaks. + if( scale > 1 && features.zoom ) { + dom.slides.style.zoom = scale; + dom.slides.style.left = ''; + dom.slides.style.top = ''; + dom.slides.style.bottom = ''; + dom.slides.style.right = ''; + transformSlides( { layout: '' } ); + } + // Apply scale transform as a fallback + else { + dom.slides.style.zoom = ''; + dom.slides.style.left = '50%'; + dom.slides.style.top = '50%'; + dom.slides.style.bottom = 'auto'; + dom.slides.style.right = 'auto'; + transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } ); + } } - if( config.center || slide.classList.contains( 'center' ) ) { - // Vertical stacks are not centred since their section - // children will be - if( slide.classList.contains( 'stack' ) ) { - slide.style.top = 0; + // Select all slides, vertical and horizontal + var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ); + + for( var i = 0, len = slides.length; i < len; i++ ) { + var slide = slides[ i ]; + + // Don't bother updating invisible slides + if( slide.style.display === 'none' ) { + continue; + } + + if( config.center || slide.classList.contains( 'center' ) ) { + // Vertical stacks are not centred since their section + // children will be + if( slide.classList.contains( 'stack' ) ) { + slide.style.top = 0; + } + else { + slide.style.top = Math.max( ( size.height - slide.scrollHeight ) / 2, 0 ) + 'px'; + } } else { - slide.style.top = Math.max( ( size.height - slide.scrollHeight ) / 2, 0 ) + 'px'; + slide.style.top = ''; } - } - else { - slide.style.top = ''; + } } @@ -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 * (nested within another slide). @@ -2411,16 +2618,7 @@ // Dispatch an event if the slide changed var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore ); - if( slideChanged ) { - dispatchEvent( 'slidechanged', { - 'indexh': indexh, - 'indexv': indexv, - 'previousSlide': previousSlide, - 'currentSlide': currentSlide, - 'origin': o - } ); - } - else { + if (!slideChanged) { // Ensure that the previous slide is never the same as the current previousSlide = null; } @@ -2428,7 +2626,7 @@ // Solves an edge case where the previous slide maintains the // 'present' class when navigating between adjacent vertical // stacks - if( previousSlide ) { + if( previousSlide && previousSlide !== currentSlide ) { previousSlide.classList.remove( 'present' ); 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 if( slideChanged || !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 * is visible. @@ -2851,6 +3094,7 @@ } + /** * Updates the slide number div to reflect the current slide. * @@ -2873,6 +3117,12 @@ 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 ) { case 'c': value.push( getSlidePastCount() + 1 ); @@ -2905,13 +3155,18 @@ */ function formatSlideNumber( a, delimiter, b ) { + var url = '#' + locationHash(); if( typeof b === 'number' && !isNaN( b ) ) { - return ''+ a +'' + + return '' + + ''+ a +'' + ''+ delimiter +'' + - ''+ b +''; + ''+ b +'' + + ''; } else { - return ''+ a +''; + return '' + + ''+ a +'' + + ''; } } @@ -3062,13 +3317,18 @@ 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) + if( /\.gif/i.test( backgroundImageURL ) ) { + currentBackgroundContent.style.backgroundImage = ''; + window.getComputedStyle( currentBackgroundContent ).opacity; + currentBackgroundContent.style.backgroundImage = backgroundImageURL; + } - // Restart GIFs (doesn't work in Firefox) - if( /\.gif/i.test( backgroundImageURL ) ) { - currentBackground.style.backgroundImage = ''; - window.getComputedStyle( currentBackground ).opacity; - currentBackground.style.backgroundImage = backgroundImageURL; } // Don't transition between identical backgrounds. This @@ -3200,11 +3460,12 @@ // Show the corresponding background element - var indices = getIndices( slide ); - var background = getSlideBackground( indices.h, indices.v ); + var background = slide.slideBackgroundElement; if( background ) { background.style.display = 'block'; + var backgroundContent = slide.slideBackgroundContentElement; + // If the background contains media, load it if( background.hasAttribute( 'data-loaded' ) === false ) { background.setAttribute( 'data-loaded', 'true' ); @@ -3217,7 +3478,7 @@ // Images if( backgroundImage ) { - background.style.backgroundImage = 'url('+ backgroundImage +')'; + backgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')'; } // Videos else if ( backgroundVideo && !isSpeakerNotes() ) { @@ -3245,7 +3506,7 @@ video.innerHTML += ''; } ); - background.appendChild( video ); + backgroundContent.appendChild( video ); } // Iframes else if( backgroundIframe && options.excludeIframes !== true ) { @@ -3268,7 +3529,7 @@ iframe.style.maxHeight = '100%'; iframe.style.maxWidth = '100%'; - background.appendChild( iframe ); + backgroundContent.appendChild( iframe ); } } @@ -3288,8 +3549,7 @@ slide.style.display = 'none'; // Hide the corresponding background element - var indices = getIndices( slide ); - var background = getSlideBackground( indices.h, indices.v ); + var background = getSlideBackground( slide ); if( background ) { background.style.display = 'none'; } @@ -3319,13 +3579,27 @@ verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR ); var routes = { - left: indexh > 0 || config.loop, - right: indexh < horizontalSlides.length - 1 || config.loop, + left: indexh > 0, + right: indexh < horizontalSlides.length - 1, up: indexv > 0, 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 ) { var left = routes.left; routes.left = routes.right; @@ -3424,9 +3698,16 @@ if( autoplay && typeof el.play === 'function' ) { + // If the media is ready, start playback if( el.readyState > 1 ) { 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 { el.removeEventListener( 'loadeddata', startEmbeddedMedia ); // remove first to avoid dupes el.addEventListener( 'loadeddata', startEmbeddedMedia ); @@ -3685,18 +3966,21 @@ var bits = hash.slice( 2 ).split( '/' ), name = hash.replace( /#|\//gi, '' ); - // If the first bit is invalid and there is a name we can - // assume that this is a named link - if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) { + // If the first bit is not fully numeric and there is a name we + // can assume that this is a named link + if( !/^[0-9]*$/.test( bits[0] ) && name.length ) { var element; // Ensure the named link is a valid HTML ID attribute - if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) { - // Find the slide with the specified ID - element = document.getElementById( name ); + try { + element = document.getElementById( decodeURIComponent( 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 var indices = Reveal.getIndices( element ); slide( indices.h, indices.v ); @@ -3707,12 +3991,22 @@ } } else { - // Read the index components of the hash - var h = parseInt( bits[0], 10 ) || 0, - v = parseInt( bits[1], 10 ) || 0; + var hashIndexBase = config.hashOneBasedIndex ? 1 : 0; - if( h !== indexh || v !== indexv ) { - slide( h, v ); + // Read the index components of the hash + 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 ); } else if( currentSlide ) { - var url = '/'; - - // 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; + window.location.hash = locationHash(); } } @@ -3858,13 +4134,14 @@ * defined, have a background element so as long as the * 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 * @return {(HTMLElement[]|*)} */ function getSlideBackground( x, y ) { - var slide = getSlide( x, y ); + var slide = typeof x === 'number' ? getSlide( x, y ) : x; if( slide ) { return slide.slideBackgroundElement; } @@ -3963,9 +4240,11 @@ * the fragment within the fragments list. * * @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 */ - function sortFragments( fragments ) { + function sortFragments( fragments, grouped ) { fragments = toArray( fragments ); @@ -4008,7 +4287,7 @@ index ++; } ); - return sorted; + return grouped === true ? ordered : sorted; } @@ -4089,6 +4368,9 @@ updateControls(); updateProgress(); + if( config.fragmentInURL ) { + writeURL(); + } return !!( fragmentsShown.length || fragmentsHidden.length ); @@ -4328,7 +4610,17 @@ // Prioritize revealing fragments 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(); } else if( config.rtl ) { @@ -4398,7 +4690,7 @@ // If there's a condition specified and it returns false, // ignore this event - if( typeof config.keyboardCondition === 'function' && config.keyboardCondition() === false ) { + if( typeof config.keyboardCondition === 'function' && config.keyboardCondition(event) === false ) { 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 ) { // Assume true and try to prove false @@ -5057,7 +5373,10 @@ initialize: initialize, configure: configure, + sync: sync, + syncSlide: syncSlide, + syncFragments: syncFragments, // Navigation methods slide: slide, @@ -5194,7 +5513,7 @@ // Returns true if we're currently on the last slide isLastSlide: function() { if( currentSlide ) { - // Does this slide has next a sibling? + // Does this slide have a next sibling? if( currentSlide.nextElementSibling ) return false; // If it's vertical, does its parent have a next sibling? @@ -5206,6 +5525,19 @@ 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 isReady: function() { 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 triggerKey: function( keyCode ) { onDocumentKeyDown( { keyCode: keyCode } ); diff --git a/js/reveal.min.js b/js/reveal.min.js new file mode 100644 index 00000000..7b2848da --- /dev/null +++ b/js/reveal.min.js @@ -0,0 +1,9 @@ +/*! + * reveal.js 3.7.0 (2018-08-01, 10:56) + * http://revealjs.com + * MIT licensed + * + * Copyright (C) 2018 Hakim El Hattab, http://hakim.se + */ + +!function(e,t){"function"==typeof define&&define.amd?define(function(){return e.Reveal=t(),e.Reveal}):"object"==typeof exports?module.exports=t():e.Reveal=t()}(this,function(){"use strict";var e,t,r,a,n,i,o,s,l,c=".slides section",d=".slides>section",u=".slides>section.present>section",p=".slides>section:first-of-type",f=navigator.userAgent,h={width:960,height:700,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,hashOneBasedIndex:!1,showSlideNumber:"all",history:!1,keyboard:!0,keyboardCondition:null,overview:!0,disableLayout:!1,center:!0,touch:!0,loop:!1,rtl:!1,shuffle:!1,fragments:!0,fragmentInURL:!1,embedded:!1,help:!0,pause:!0,showNotes:!1,autoPlayMedia:null,autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,display:"block",dependencies:[]},v=!1,g=!1,m=!1,b=null,y=null,w=!1,k=!1,A=[],L=1,S={layout:"",overview:""},E={},x={},q=0,N=0,M=!1,I=0,T=0,C=-1,P=!1,B={startX:0,startY:0,startSpan:0,startCount:0,captured:!1,threshold:40},H={"N , SPACE":"Next slide",P:"Previous slide","← , H":"Navigate left","→ , L":"Navigate right","↑ , K":"Navigate up","↓ , J":"Navigate down",Home:"First slide",End:"Last slide","B , .":"Pause",F:"Fullscreen","ESC, O":"Slide overview"},R={};function D(e){var t="";if(3===e.nodeType)t+=e.textContent;else if(1===e.nodeType){var r=e.getAttribute("aria-hidden"),a="none"===window.getComputedStyle(e).display;"true"===r||a||V(e.childNodes).forEach(function(e){t+=D(e)})}return t}function z(){var e=de(window.innerWidth,window.innerHeight),t=Math.floor(e.width*(1+h.margin)),r=Math.floor(e.height*(1+h.margin)),a=e.width,n=e.height;Q("@page{size:"+t+"px "+r+"px; margin: 0px;}"),Q(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+a+"px; max-height:"+n+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=t+"px",document.body.style.height=r+"px",ce(a,n),V(E.wrapper.querySelectorAll(d)).forEach(function(e,t){e.setAttribute("data-index-h",t),e.classList.contains("stack")&&V(e.querySelectorAll("section")).forEach(function(e,r){e.setAttribute("data-index-h",t),e.setAttribute("data-index-v",r)})}),V(E.wrapper.querySelectorAll(c)).forEach(function(e){if(!1===e.classList.contains("stack")){var i=(t-a)/2,o=(r-n)/2,s=e.scrollHeight,l=Math.max(Math.ceil(s/r),1);(1===(l=Math.min(l,h.pdfMaxPagesPerSlide))&&h.center||e.classList.contains("center"))&&(o=Math.max((r-s)/2,0));var c=document.createElement("div");if(c.className="pdf-page",c.style.height=(r+h.pdfPageHeightOffset)*l+"px",e.parentNode.insertBefore(c,e),c.appendChild(e),e.style.left=i+"px",e.style.top=o+"px",e.style.width=a+"px",e.slideBackgroundElement&&c.insertBefore(e.slideBackgroundElement,e),h.showNotes){var d=at(e);if(d){var u="string"==typeof h.showNotes?h.showNotes:"inline",p=document.createElement("div");p.classList.add("speaker-notes"),p.classList.add("speaker-notes-pdf"),p.setAttribute("data-layout",u),p.innerHTML=d,"separate-page"===u?c.parentNode.insertBefore(p,c.nextSibling):(p.style.left="8px",p.style.bottom="8px",p.style.width=t-16+"px",c.appendChild(p))}}if(h.slideNumber&&/all|print/i.test(h.showSlideNumber)){var f=parseInt(e.getAttribute("data-index-h"),10)+1,v=parseInt(e.getAttribute("data-index-v"),10)+1,g=document.createElement("div");g.classList.add("slide-number"),g.classList.add("slide-number-pdf"),g.innerHTML=He(f,".",v),c.appendChild(g)}if(h.pdfSeparateFragments){var m,b,y=it(c.querySelectorAll(".fragment"),!0);y.forEach(function(e){m&&m.forEach(function(e){e.classList.remove("current-fragment")}),e.forEach(function(e){e.classList.add("visible","current-fragment")});var t=c.cloneNode(!0);c.parentNode.insertBefore(t,(b||c).nextSibling),m=e,b=t}),y.forEach(function(e){e.forEach(function(e){e.classList.remove("visible","current-fragment")})})}else V(c.querySelectorAll(".fragment:not(.fade-out)")).forEach(function(e){e.classList.add("visible")})}}),re("pdf-ready")}function O(e,t,r,a){for(var n=e.querySelectorAll("."+r),i=0;i1&&h.autoSlide&&h.autoSlideStoppable&&x.canvas&&x.requestAnimationFrame&&((l=new Yt(E.wrapper,function(){return Math.min(Math.max((Date.now()-C)/I,0),1)})).on("click",Ut),P=!1),!1===h.fragments&&V(E.slides.querySelectorAll(".fragment")).forEach(function(e){e.classList.add("visible"),e.classList.remove("current-fragment")});var a="none";h.slideNumber&&!ee()&&("all"===h.showSlideNumber?a="block":"speaker"===h.showSlideNumber&&_e()&&(a="block")),E.slideNumber.style.display=a,qe()}}function Y(){var e;(M=!0,window.addEventListener("hashchange",Dt,!1),window.addEventListener("resize",zt,!1),h.touch&&("onpointerdown"in window?(E.wrapper.addEventListener("pointerdown",xt,!1),E.wrapper.addEventListener("pointermove",qt,!1),E.wrapper.addEventListener("pointerup",Nt,!1)):window.navigator.msPointerEnabled?(E.wrapper.addEventListener("MSPointerDown",xt,!1),E.wrapper.addEventListener("MSPointerMove",qt,!1),E.wrapper.addEventListener("MSPointerUp",Nt,!1)):(E.wrapper.addEventListener("touchstart",Lt,!1),E.wrapper.addEventListener("touchmove",St,!1),E.wrapper.addEventListener("touchend",Et,!1))),h.keyboard&&(document.addEventListener("keydown",At,!1),document.addEventListener("keypress",kt,!1)),h.progress&&E.progress&&E.progress.addEventListener("click",It,!1),E.resumeButton.addEventListener("click",Ae,!1),h.focusBodyOnPageVisibilityChange)&&("hidden"in document?e="visibilitychange":"msHidden"in document?e="msvisibilitychange":"webkitHidden"in document&&(e="webkitvisibilitychange"),e&&document.addEventListener(e,Ot,!1));var t=["touchstart","click"];f.match(/android/gi)&&(t=["touchstart"]),t.forEach(function(e){E.controlsLeft.forEach(function(t){t.addEventListener(e,Tt,!1)}),E.controlsRight.forEach(function(t){t.addEventListener(e,Ct,!1)}),E.controlsUp.forEach(function(t){t.addEventListener(e,Pt,!1)}),E.controlsDown.forEach(function(t){t.addEventListener(e,Bt,!1)}),E.controlsPrev.forEach(function(t){t.addEventListener(e,Ht,!1)}),E.controlsNext.forEach(function(t){t.addEventListener(e,Rt,!1)})})}function X(){M=!1,document.removeEventListener("keydown",At,!1),document.removeEventListener("keypress",kt,!1),window.removeEventListener("hashchange",Dt,!1),window.removeEventListener("resize",zt,!1),E.wrapper.removeEventListener("pointerdown",xt,!1),E.wrapper.removeEventListener("pointermove",qt,!1),E.wrapper.removeEventListener("pointerup",Nt,!1),E.wrapper.removeEventListener("MSPointerDown",xt,!1),E.wrapper.removeEventListener("MSPointerMove",qt,!1),E.wrapper.removeEventListener("MSPointerUp",Nt,!1),E.wrapper.removeEventListener("touchstart",Lt,!1),E.wrapper.removeEventListener("touchmove",St,!1),E.wrapper.removeEventListener("touchend",Et,!1),E.resumeButton.removeEventListener("click",Ae,!1),h.progress&&E.progress&&E.progress.removeEventListener("click",It,!1),["touchstart","click"].forEach(function(e){E.controlsLeft.forEach(function(t){t.removeEventListener(e,Tt,!1)}),E.controlsRight.forEach(function(t){t.removeEventListener(e,Ct,!1)}),E.controlsUp.forEach(function(t){t.removeEventListener(e,Pt,!1)}),E.controlsDown.forEach(function(t){t.removeEventListener(e,Bt,!1)}),E.controlsPrev.forEach(function(t){t.removeEventListener(e,Ht,!1)}),E.controlsNext.forEach(function(t){t.removeEventListener(e,Rt,!1)})})}function j(e,t){for(var r in t)e[r]=t[r];return e}function V(e){return Array.prototype.slice.call(e)}function K(e){if("string"==typeof e){if("null"===e)return null;if("true"===e)return!0;if("false"===e)return!1;if(e.match(/^-?[\d\.]+$/))return parseFloat(e)}return e}function $(e,t){var r=e.x-t.x,a=e.y-t.y;return Math.sqrt(r*r+a*a)}function _(e,t){e.style.WebkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.transform=t}function J(e){"string"==typeof e.layout&&(S.layout=e.layout),"string"==typeof e.overview&&(S.overview=e.overview),S.layout?_(E.slides,S.layout+" "+S.overview):_(E.slides,S.overview)}function Q(e){var t=document.createElement("style");t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(t)}function Z(e,t){for(var r=e.parentNode;r;){var a=r.matches||r.matchesSelector||r.msMatchesSelector;if(a&&a.call(r,t))return r;r=r.parentNode}return null}function G(e){var t=e.match(/^#([0-9a-f]{3})$/i);if(t&&t[1])return t=t[1],{r:17*parseInt(t.charAt(0),16),g:17*parseInt(t.charAt(1),16),b:17*parseInt(t.charAt(2),16)};var r=e.match(/^#([0-9a-f]{6})$/i);if(r&&r[1])return r=r[1],{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16)};var a=e.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);if(a)return{r:parseInt(a[1],10),g:parseInt(a[2],10),b:parseInt(a[3],10)};var n=e.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i);return n?{r:parseInt(n[1],10),g:parseInt(n[2],10),b:parseInt(n[3],10),a:parseFloat(n[4])}:null}function ee(){return/print-pdf/gi.test(window.location.search)}function te(){setTimeout(function(){window.scrollTo(0,1)},10)}function re(e,t){var r=document.createEvent("HTMLEvents",1,2);r.initEvent(e,!0,!0),j(r,t),E.wrapper.dispatchEvent(r),h.postMessageEvents&&window.parent!==window.self&&window.parent.postMessage(JSON.stringify({namespace:"reveal",eventName:e,state:nt()}),"*")}function ae(e){V(document.querySelectorAll(e||"a")).forEach(function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.addEventListener("click",Ft,!1)})}function ne(e){V(document.querySelectorAll(e||"a")).forEach(function(e){/^(http|www)/gi.test(e.getAttribute("href"))&&e.removeEventListener("click",Ft,!1)})}function ie(e){"boolean"==typeof e?e?oe():se():E.overlay?se():oe()}function oe(){if(h.help){se(),E.overlay=document.createElement("div"),E.overlay.classList.add("overlay"),E.overlay.classList.add("overlay-help"),E.wrapper.appendChild(E.overlay);var e='

Keyboard Shortcuts


';for(var t in e+="",H)e+="";for(var r in R)R[r].key&&R[r].description&&(e+="");e+="
KEYACTION
"+t+""+H[t]+"
"+R[r].key+""+R[r].description+"
",E.overlay.innerHTML=["
",'',"
",'
','
'+e+"
","
"].join(""),E.overlay.querySelector(".close").addEventListener("click",function(e){se(),e.preventDefault()},!1),setTimeout(function(){E.overlay.classList.add("visible")},1)}}function se(){E.overlay&&(E.overlay.parentNode.removeChild(E.overlay),E.overlay=null)}function le(){if(E.wrapper&&!ee()){if(!h.disableLayout){var e=de();ce(h.width,h.height),E.slides.style.width=e.width+"px",E.slides.style.height=e.height+"px",L=Math.min(e.presentationWidth/e.width,e.presentationHeight/e.height),L=Math.max(L,h.minScale),1===(L=Math.min(L,h.maxScale))?(E.slides.style.zoom="",E.slides.style.left="",E.slides.style.top="",E.slides.style.bottom="",E.slides.style.right="",J({layout:""})):L>1&&x.zoom?(E.slides.style.zoom=L,E.slides.style.left="",E.slides.style.top="",E.slides.style.bottom="",E.slides.style.right="",J({layout:""})):(E.slides.style.zoom="",E.slides.style.left="50%",E.slides.style.top="50%",E.slides.style.bottom="auto",E.slides.style.right="auto",J({layout:"translate(-50%, -50%) scale("+L+")"}));for(var t=V(E.wrapper.querySelectorAll(c)),r=0,a=t.length;r .stretch")).forEach(function(r){var a=function(e,t){if(t=t||0,e){var r,a=e.style.height;return e.style.height="0px",r=t-e.parentNode.offsetHeight,e.style.height=a+"px",r}return t}(r,t);if(/(img|video)/gi.test(r.nodeName)){var n=r.naturalWidth||r.videoWidth,i=r.naturalHeight||r.videoHeight,o=Math.min(e/n,a/i);r.style.width=n*o+"px",r.style.height=i*o+"px"}else r.style.width=e+"px",r.style.height=a+"px"})}function de(e,t){var r={width:h.width,height:h.height,presentationWidth:e||E.wrapper.offsetWidth,presentationHeight:t||E.wrapper.offsetHeight};return r.presentationWidth-=r.presentationWidth*h.margin,r.presentationHeight-=r.presentationHeight*h.margin,"string"==typeof r.width&&/%$/.test(r.width)&&(r.width=parseInt(r.width,10)/100*r.presentationWidth),"string"==typeof r.height&&/%$/.test(r.height)&&(r.height=parseInt(r.height,10)/100*r.presentationHeight),r}function ue(e,t){"object"==typeof e&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",t||0)}function pe(e){if("object"==typeof e&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){var t=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(t)||0,10)}return 0}function fe(){if(h.overview&&!be()){m=!0,E.wrapper.classList.add("overview"),E.wrapper.classList.remove("overview-deactivating"),x.overviewTransitions&&setTimeout(function(){E.wrapper.classList.add("overview-animated")},1),dt(),E.slides.appendChild(E.background),V(E.wrapper.querySelectorAll(c)).forEach(function(e){e.classList.contains("stack")||e.addEventListener("click",Wt,!0)});var e=de();b=e.width+70,y=e.height+70,h.rtl&&(b=-b),Te(),he(),ve(),le(),re("overviewshown",{indexh:t,indexv:r,currentSlide:n})}}function he(){V(E.wrapper.querySelectorAll(d)).forEach(function(e,t){e.setAttribute("data-index-h",t),_(e,"translate3d("+t*b+"px, 0, 0)"),e.classList.contains("stack")&&V(e.querySelectorAll("section")).forEach(function(e,r){e.setAttribute("data-index-h",t),e.setAttribute("data-index-v",r),_(e,"translate3d(0, "+r*y+"px, 0)")})}),V(E.background.childNodes).forEach(function(e,t){_(e,"translate3d("+t*b+"px, 0, 0)"),V(e.querySelectorAll(".slide-background")).forEach(function(e,t){_(e,"translate3d(0, "+t*y+"px, 0)")})})}function ve(){var e=Math.min(window.innerWidth,window.innerHeight);J({overview:["scale("+Math.max(e/5,150)/e+")","translateX("+-t*b+"px)","translateY("+-r*y+"px)"].join(" ")})}function ge(){h.overview&&(m=!1,E.wrapper.classList.remove("overview"),E.wrapper.classList.remove("overview-animated"),E.wrapper.classList.add("overview-deactivating"),setTimeout(function(){E.wrapper.classList.remove("overview-deactivating")},1),E.wrapper.appendChild(E.background),V(E.wrapper.querySelectorAll(c)).forEach(function(e){_(e,""),e.removeEventListener("click",Wt,!0)}),V(E.background.querySelectorAll(".slide-background")).forEach(function(e){_(e,"")}),J({overview:""}),xe(t,r),le(),ct(),re("overviewhidden",{indexh:t,indexv:r,currentSlide:n}))}function me(e){"boolean"==typeof e?e?fe():ge():be()?ge():fe()}function be(){return m}function ye(){var e,a="/",i=n?n.getAttribute("id"):null;if(i&&(i=encodeURIComponent(i)),h.fragmentInURL&&(e=Ze().f),"string"==typeof i&&i.length&&e===undefined)a="/"+i;else{var o=h.hashOneBasedIndex?1:0;(t>0||r>0||e!==undefined)&&(a+=t+o),(r>0||e!==undefined)&&(a+="/"+(r+o)),e!==undefined&&(a+="/"+e)}return a}function we(e){return(e=e||n)&&e.parentNode&&!!e.parentNode.nodeName.match(/section/i)}function ke(){if(h.pause){var e=E.wrapper.classList.contains("paused");dt(),E.wrapper.classList.add("paused"),!1===e&&re("paused")}}function Ae(){var e=E.wrapper.classList.contains("paused");E.wrapper.classList.remove("paused"),ct(),e&&re("resumed")}function Le(e){"boolean"==typeof e?e?ke():Ae():Se()?Ae():ke()}function Se(){return E.wrapper.classList.contains("paused")}function Ee(e){"boolean"==typeof e?e?pt():ut():P?pt():ut()}function xe(e,i,o,s){a=n;var l=E.wrapper.querySelectorAll(d);if(0!==l.length){i!==undefined||be()||(i=pe(l[e])),a&&a.parentNode&&a.parentNode.classList.contains("stack")&&ue(a.parentNode,r);var c=A.concat();A.length=0;var f=t||0,h=r||0;t=Ie(d,e===undefined?t:e),r=Ie(u,i===undefined?r:i),Te(),le();e:for(var v=0,g=A.length;v0?E.wrapper.classList.add("show-notes"):E.wrapper.classList.remove("show-notes"),Ce(),(e=function(e,t,r){V(E.slides.querySelectorAll("iframe["+e+'*="'+t+'"]')).forEach(function(t){var a=t.getAttribute(e);a&&-1===a.indexOf(r)&&t.setAttribute(e,a+(/\?/.test(a)?"&":"?")+r)})})("src","youtube.com/embed/","enablejsapi=1"),e("data-src","youtube.com/embed/","enablejsapi=1"),e("src","player.vimeo.com/","api=1"),e("data-src","player.vimeo.com/","api=1"),o&&V(E.slides.querySelectorAll("video, audio")).forEach(function(e){e.controls=!0}),!1===h.autoPlayMedia?Ve(n,{unloadIframes:!1}):Ye(n),be()&&he()}function Ne(e){it(e.querySelectorAll(".fragment"))}function Me(){var e=V(E.wrapper.querySelectorAll(d));e.forEach(function(t){E.slides.insertBefore(t,e[Math.floor(Math.random()*e.length)])})}function Ie(e,t){var r=V(E.wrapper.querySelectorAll(e)),a=r.length,n=ee();if(a){h.loop&&(t%=a)<0&&(t=a+t),t=Math.max(Math.min(t,a-1),0);for(var i=0;it&&(o.classList.add(s?"past":"future"),h.fragments))for(var d=V(o.querySelectorAll(".fragment.visible"));d.length;){var u=d.pop();u.classList.remove("visible"),u.classList.remove("current-fragment")}}r[t].classList.add("present"),r[t].removeAttribute("hidden"),r[t].removeAttribute("aria-hidden");var p=r[t].getAttribute("data-state");p&&(A=A.concat(p.split(" ")))}else t=0;return t}function Te(){var e,a=V(E.wrapper.querySelectorAll(d)),n=a.length;if(n&&void 0!==t){var i=be()?10:h.viewDistance;o&&(i=be()?6:2),ee()&&(i=Number.MAX_VALUE);for(var s=0;ssection>section").length?E.wrapper.classList.add("has-vertical-slides"):E.wrapper.classList.remove("has-vertical-slides"),E.wrapper.querySelectorAll(".slides>section").length>1?E.wrapper.classList.add("has-horizontal-slides"):E.wrapper.classList.remove("has-horizontal-slides")}}function Ce(){h.showNotes&&E.speakerNotes&&n&&!ee()&&(E.speakerNotes.innerHTML=at()||'No notes on this slide.')}function Pe(){h.progress&&E.progressbar&&(E.progressbar.style.width=$e()*E.wrapper.offsetWidth+"px")}function Be(){if(h.slideNumber&&E.slideNumber){var e=[],a="h.v";switch("string"==typeof h.slideNumber&&(a=h.slideNumber),/c/.test(a)||1!==E.wrapper.querySelectorAll(d).length||(a="c"),a){case"c":e.push(Ke()+1);break;case"c/t":e.push(Ke()+1,"/",et());break;case"h/v":e.push(t+1),we()&&e.push("/",r+1);break;default:e.push(t+1),we()&&e.push(".",r+1)}E.slideNumber.innerHTML=He(e[0],e[1],e[2])}}function He(e,t,r){var a="#"+ye();return"number"!=typeof r||isNaN(r)?''+e+"":''+e+''+t+''+r+""}function Re(){var e=Fe(),t=Ue();E.controlsLeft.concat(E.controlsRight).concat(E.controlsUp).concat(E.controlsDown).concat(E.controlsPrev).concat(E.controlsNext).forEach(function(e){e.classList.remove("enabled"),e.classList.remove("fragmented"),e.setAttribute("disabled","disabled")}),e.left&&E.controlsLeft.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),e.right&&E.controlsRight.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),e.up&&E.controlsUp.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),e.down&&E.controlsDown.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.left||e.up)&&E.controlsPrev.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),(e.right||e.down)&&E.controlsNext.forEach(function(e){e.classList.add("enabled"),e.removeAttribute("disabled")}),n&&(t.prev&&E.controlsPrev.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&E.controlsNext.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),we(n)?(t.prev&&E.controlsUp.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&E.controlsDown.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")})):(t.prev&&E.controlsLeft.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}),t.next&&E.controlsRight.forEach(function(e){e.classList.add("fragmented","enabled"),e.removeAttribute("disabled")}))),h.controlsTutorial&&(!k&&e.down?E.controlsDownArrow.classList.add("highlight"):(E.controlsDownArrow.classList.remove("highlight"),!w&&e.right&&0===r?E.controlsRightArrow.classList.add("highlight"):E.controlsRightArrow.classList.remove("highlight")))}function De(e){var a=null,o=h.rtl?"future":"past",s=h.rtl?"past":"future";if(V(E.background.childNodes).forEach(function(n,i){n.classList.remove("past"),n.classList.remove("present"),n.classList.remove("future"),it?n.classList.add(s):(n.classList.add("present"),a=n),(e||i===t)&&V(n.querySelectorAll(".slide-background")).forEach(function(e,n){e.classList.remove("past"),e.classList.remove("present"),e.classList.remove("future"),nr?e.classList.add("future"):(e.classList.add("present"),i===t&&(a=e))})}),i&&Ve(i),a){Ye(a);var l=a.querySelector(".slide-background-content");if(l){var c=l.style.backgroundImage||"";/\.gif/i.test(c)&&(l.style.backgroundImage="",window.getComputedStyle(l).opacity,l.style.backgroundImage=c)}var d=i?i.getAttribute("data-background-hash"):null,u=a.getAttribute("data-background-hash");u&&u===d&&a!==i&&E.background.classList.add("no-transition"),i=a}n&&["has-light-background","has-dark-background"].forEach(function(e){n.classList.contains(e)?E.wrapper.classList.add(e):E.wrapper.classList.remove(e)}),setTimeout(function(){E.background.classList.remove("no-transition")},1)}function ze(){if(h.parallaxBackgroundImage){var e,a,n=E.wrapper.querySelectorAll(d),i=E.wrapper.querySelectorAll(u),o=E.background.style.backgroundSize.split(" ");1===o.length?e=a=parseInt(o[0],10):(e=parseInt(o[0],10),a=parseInt(o[1],10));var s,l=E.background.offsetWidth,c=n.length;s=("number"==typeof h.parallaxBackgroundHorizontal?h.parallaxBackgroundHorizontal:c>1?(e-l)/(c-1):0)*t*-1;var p,f,v=E.background.offsetHeight,g=i.length;p="number"==typeof h.parallaxBackgroundVertical?h.parallaxBackgroundVertical:(a-v)/(g-1),f=g>0?p*r:0,E.background.style.backgroundPosition=s+"px "+-f+"px"}}function Oe(e,t){t=t||{},e.style.display=h.display,V(e.querySelectorAll("img[data-src], video[data-src], audio[data-src]")).forEach(function(e){e.setAttribute("src",e.getAttribute("data-src")),e.setAttribute("data-lazy-loaded",""),e.removeAttribute("data-src")}),V(e.querySelectorAll("video, audio")).forEach(function(e){var t=0;V(e.querySelectorAll("source[data-src]")).forEach(function(e){e.setAttribute("src",e.getAttribute("data-src")),e.removeAttribute("data-src"),e.setAttribute("data-lazy-loaded",""),t+=1}),t>0&&e.load()});var r=e.slideBackgroundElement;if(r){r.style.display="block";var a=e.slideBackgroundContentElement;if(!1===r.hasAttribute("data-loaded")){r.setAttribute("data-loaded","true");var n=e.getAttribute("data-background-image"),i=e.getAttribute("data-background-video"),s=e.hasAttribute("data-background-video-loop"),l=e.hasAttribute("data-background-video-muted"),c=e.getAttribute("data-background-iframe");if(n)a.style.backgroundImage="url("+encodeURI(n)+")";else if(i&&!_e()){var d=document.createElement("video");s&&d.setAttribute("loop",""),l&&(d.muted=!0),o&&(d.muted=!0,d.autoplay=!0,d.setAttribute("playsinline","")),i.split(",").forEach(function(e){d.innerHTML+=''}),a.appendChild(d)}else if(c&&!0!==t.excludeIframes){var u=document.createElement("iframe");u.setAttribute("allowfullscreen",""),u.setAttribute("mozallowfullscreen",""),u.setAttribute("webkitallowfullscreen",""),/autoplay=(1|true|yes)/gi.test(c)?u.setAttribute("data-src",c):u.setAttribute("src",c),u.style.width="100%",u.style.height="100%",u.style.maxHeight="100%",u.style.maxWidth="100%",a.appendChild(u)}}}}function We(e){e.style.display="none";var t=rt(e);t&&(t.style.display="none"),V(e.querySelectorAll("video[data-lazy-loaded][src], audio[data-lazy-loaded][src]")).forEach(function(e){e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")}),V(e.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]")).forEach(function(e){e.setAttribute("data-src",e.getAttribute("src")),e.removeAttribute("src")})}function Fe(){var e=E.wrapper.querySelectorAll(d),a=E.wrapper.querySelectorAll(u),n={left:t>0,right:t0,down:r1&&(n.left=!0,n.right=!0),a.length>1&&(n.up=!0,n.down=!0)),h.rtl){var i=n.left;n.left=n.right,n.right=i}return n}function Ue(){if(n&&h.fragments){var e=n.querySelectorAll(".fragment"),t=n.querySelectorAll(".fragment:not(.visible)");return{prev:e.length-t.length>0,next:!!t.length}}return{prev:!1,next:!1}}function Ye(e){e&&!_e()&&(V(e.querySelectorAll('img[src$=".gif"]')).forEach(function(e){e.setAttribute("src",e.getAttribute("src"))}),V(e.querySelectorAll("video, audio")).forEach(function(e){if(!Z(e,".fragment")||Z(e,".fragment.visible")){var t=h.autoPlayMedia;"boolean"!=typeof t&&(t=e.hasAttribute("data-autoplay")||!!Z(e,".slide-background")),t&&"function"==typeof e.play&&(e.readyState>1?Xe({target:e}):o?e.play():(e.removeEventListener("loadeddata",Xe),e.addEventListener("loadeddata",Xe)))}}),V(e.querySelectorAll("iframe[src]")).forEach(function(e){Z(e,".fragment")&&!Z(e,".fragment.visible")||je({target:e})}),V(e.querySelectorAll("iframe[data-src]")).forEach(function(e){Z(e,".fragment")&&!Z(e,".fragment.visible")||e.getAttribute("src")!==e.getAttribute("data-src")&&(e.removeEventListener("load",je),e.addEventListener("load",je),e.setAttribute("src",e.getAttribute("data-src")))}))}function Xe(e){var t=!!Z(e.target,"html"),r=!!Z(e.target,".present");t&&r&&(e.target.currentTime=0,e.target.play()),e.target.removeEventListener("loadeddata",Xe)}function je(e){var t=e.target;if(t&&t.contentWindow){var r=!!Z(e.target,"html"),a=!!Z(e.target,".present");if(r&&a){var n=h.autoPlayMedia;"boolean"!=typeof n&&(n=t.hasAttribute("data-autoplay")||!!Z(t,".slide-background")),/youtube\.com\/embed\//.test(t.getAttribute("src"))&&n?t.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(t.getAttribute("src"))&&n?t.contentWindow.postMessage('{"method":"play"}',"*"):t.contentWindow.postMessage("slide:start","*")}}}function Ve(e,t){t=j({unloadIframes:!0},t||{}),e&&e.parentNode&&(V(e.querySelectorAll("video, audio")).forEach(function(e){e.hasAttribute("data-ignore")||"function"!=typeof e.pause||(e.setAttribute("data-paused-by-reveal",""),e.pause())}),V(e.querySelectorAll("iframe")).forEach(function(e){e.contentWindow&&e.contentWindow.postMessage("slide:stop","*"),e.removeEventListener("load",je)}),V(e.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(e){!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),V(e.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(function(e){!e.hasAttribute("data-ignore")&&e.contentWindow&&"function"==typeof e.contentWindow.postMessage&&e.contentWindow.postMessage('{"method":"pause"}',"*")}),!0===t.unloadIframes&&V(e.querySelectorAll("iframe[data-src]")).forEach(function(e){e.setAttribute("src","about:blank"),e.removeAttribute("src")}))}function Ke(){var e=V(E.wrapper.querySelectorAll(d)),t=0;e:for(var r=0;r0){t+=n.querySelectorAll(".fragment.visible").length/r.length*.9}}return t/(e-1)}function _e(){return!!window.location.search.match(/receiver/gi)}function Je(){var a=window.location.hash,i=a.slice(2).split("/"),o=a.replace(/#|\//gi,"");if(isNaN(parseInt(i[0],10))&&o.length){var s;try{s=document.getElementById(decodeURIComponent(o))}catch(v){}var l=!!n&&n.getAttribute("id")===o;if(s&&!l){var c=e.getIndices(s);xe(c.h,c.v)}else xe(t||0,r||0)}else{var d,u=h.hashOneBasedIndex?1:0,p=parseInt(i[0],10)-u||0,f=parseInt(i[1],10)-u||0;h.fragmentInURL&&(d=parseInt(i[2],10),isNaN(d)&&(d=undefined)),p===t&&f===r&&d===undefined||xe(p,f,d)}}function Qe(e){h.history&&(clearTimeout(N),"number"==typeof e?N=setTimeout(Qe,e):n&&(window.location.hash=ye()))}function Ze(e){var a,i=t,o=r;if(e){var s=we(e),l=s?e.parentNode:e,c=V(E.wrapper.querySelectorAll(d));i=Math.max(c.indexOf(l),0),o=undefined,s&&(o=Math.max(V(e.parentNode.querySelectorAll("section")).indexOf(e),0))}if(!e&&n&&n.querySelectorAll(".fragment").length>0){var u=n.querySelector(".current-fragment");a=u&&u.hasAttribute("data-fragment-index")?parseInt(u.getAttribute("data-fragment-index"),10):n.querySelectorAll(".fragment.visible").length-1}return{h:i,v:o,f:a}}function Ge(){return V(E.wrapper.querySelectorAll(c+":not(.stack)"))}function et(){return Ge().length}function tt(e,t){var r=E.wrapper.querySelectorAll(d)[e],a=r&&r.querySelectorAll("section");return a&&a.length&&"number"==typeof t?a?a[t]:undefined:r}function rt(e,t){var r="number"==typeof e?tt(e,t):e;return r?r.slideBackgroundElement:undefined}function at(e){if((e=e||n).hasAttribute("data-notes"))return e.getAttribute("data-notes");var t=e.querySelector("aside.notes");return t?t.innerHTML:null}function nt(){var e=Ze();return{indexh:e.h,indexv:e.v,indexf:e.f,paused:Se(),overview:be()}}function it(e,t){var r=[],a=[],n=[];(e=V(e)).forEach(function(e,t){if(e.hasAttribute("data-fragment-index")){var n=parseInt(e.getAttribute("data-fragment-index"),10);r[n]||(r[n]=[]),r[n].push(e)}else a.push([e])});var i=0;return(r=r.concat(a)).forEach(function(e){e.forEach(function(e){n.push(e),e.setAttribute("data-fragment-index",i)}),i++}),!0===t?r:n}function ot(e,t){if(n&&h.fragments){var r=it(n.querySelectorAll(".fragment"));if(r.length){if("number"!=typeof e){var a=it(n.querySelectorAll(".fragment.visible")).pop();e=a?parseInt(a.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof t&&(e+=t);var i=[],o=[];return V(r).forEach(function(t,r){t.hasAttribute("data-fragment-index")&&(r=parseInt(t.getAttribute("data-fragment-index"),10)),r<=e?(t.classList.contains("visible")||i.push(t),t.classList.add("visible"),t.classList.remove("current-fragment"),E.statusDiv.textContent=D(t),r===e&&(t.classList.add("current-fragment"),Ye(t))):(t.classList.contains("visible")&&o.push(t),t.classList.remove("visible"),t.classList.remove("current-fragment"))}),o.length&&re("fragmenthidden",{fragment:o[0],fragments:o}),i.length&&re("fragmentshown",{fragment:i[0],fragments:i}),Re(),Pe(),h.fragmentInURL&&Qe(),!(!i.length&&!o.length)}}return!1}function st(){return ot(null,1)}function lt(){return ot(null,-1)}function ct(){if(dt(),n&&!1!==h.autoSlide){var t=n.querySelector(".current-fragment");t||(t=n.querySelector(".fragment"));var r=t?t.getAttribute("data-autoslide"):null,a=n.parentNode?n.parentNode.getAttribute("data-autoslide"):null,i=n.getAttribute("data-autoslide");I=r?parseInt(r,10):i?parseInt(i,10):a?parseInt(a,10):h.autoSlide,0===n.querySelectorAll(".fragment").length&&V(n.querySelectorAll("video, audio")).forEach(function(e){e.hasAttribute("data-autoplay")&&I&&1e3*e.duration/e.playbackRate>I&&(I=1e3*e.duration/e.playbackRate+1e3)}),!I||P||Se()||be()||e.isLastSlide()&&!Ue().next&&!0!==h.loop||(T=setTimeout(function(){"function"==typeof h.autoSlideMethod?h.autoSlideMethod():bt(),ct()},I),C=Date.now()),l&&l.setPlaying(-1!==T)}}function dt(){clearTimeout(T),T=-1}function ut(){I&&!P&&(P=!0,re("autoslidepaused"),clearTimeout(T),l&&l.setPlaying(!1))}function pt(){I&&P&&(P=!1,re("autoslideresumed"),ct())}function ft(){h.rtl?(be()||!1===st())&&Fe().left&&xe(t+1):(be()||!1===lt())&&Fe().left&&xe(t-1)}function ht(){w=!0,h.rtl?(be()||!1===lt())&&Fe().right&&xe(t-1):(be()||!1===st())&&Fe().right&&xe(t+1)}function vt(){(be()||!1===lt())&&Fe().up&&xe(t,r-1)}function gt(){k=!0,(be()||!1===st())&&Fe().down&&xe(t,r+1)}function mt(){var e;if(!1===lt())if(Fe().up)vt();else if(e=h.rtl?V(E.wrapper.querySelectorAll(d+".future")).pop():V(E.wrapper.querySelectorAll(d+".past")).pop()){var r=e.querySelectorAll("section").length-1||undefined;xe(t-1,r)}}function bt(){if(w=!0,k=!0,!1===st()){var t=Fe();t.down&&t.right&&h.loop&&e.isLastVerticalSlide(n)&&(t.down=!1),t.down?gt():h.rtl?ft():ht()}}function yt(e){for(;e&&"function"==typeof e.hasAttribute;){if(e.hasAttribute("data-prevent-swipe"))return!0;e=e.parentNode}return!1}function wt(e){h.autoSlideStoppable&&ut()}function kt(e){e.shiftKey&&63===e.charCode&&ie()}function At(t){if("function"==typeof h.keyboardCondition&&!1===h.keyboardCondition(t))return!0;var r=P;wt();var a=document.activeElement&&"inherit"!==document.activeElement.contentEditable,n=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),i=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className);if(!(a||n||i||t.shiftKey&&32!==t.keyCode||t.altKey||t.ctrlKey||t.metaKey)){var o,s=[66,86,190,191];if("object"==typeof h.keyboard)for(o in h.keyboard)"togglePause"===h.keyboard[o]&&s.push(parseInt(o,10));if(Se()&&-1===s.indexOf(t.keyCode))return!1;var l,c,d=!1;if("object"==typeof h.keyboard)for(o in h.keyboard)if(parseInt(o,10)===t.keyCode){var u=h.keyboard[o];"function"==typeof u?u.apply(null,[t]):"string"==typeof u&&"function"==typeof e[u]&&e[u].call(),d=!0}if(!1===d)for(o in R)if(parseInt(o,10)===t.keyCode){var p=R[o].callback;"function"==typeof p?p.apply(null,[t]):"string"==typeof p&&"function"==typeof e[p]&&e[p].call(),d=!0}if(!1===d)switch(d=!0,t.keyCode){case 80:case 33:mt();break;case 78:case 34:bt();break;case 72:case 37:ft();break;case 76:case 39:ht();break;case 75:case 38:vt();break;case 74:case 40:gt();break;case 36:xe(0);break;case 35:xe(Number.MAX_VALUE);break;case 32:be()?ge():t.shiftKey?mt():bt();break;case 13:be()?ge():d=!1;break;case 58:case 59:case 66:case 86:case 190:case 191:Le();break;case 70:l=document.documentElement,(c=l.requestFullscreen||l.webkitRequestFullscreen||l.webkitRequestFullScreen||l.mozRequestFullScreen||l.msRequestFullscreen)&&c.apply(l);break;case 65:h.autoSlideStoppable&&Ee(r);break;default:d=!1}d?t.preventDefault&&t.preventDefault():27!==t.keyCode&&79!==t.keyCode||!x.transforms3d||(E.overlay?se():me(),t.preventDefault&&t.preventDefault()),ct()}}function Lt(e){if(yt(e.target))return!0;B.startX=e.touches[0].clientX,B.startY=e.touches[0].clientY,B.startCount=e.touches.length,2===e.touches.length&&h.overview&&(B.startSpan=$({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:B.startX,y:B.startY}))}function St(e){if(yt(e.target))return!0;if(B.captured)f.match(/android/gi)&&e.preventDefault();else{wt();var t=e.touches[0].clientX,r=e.touches[0].clientY;if(2===e.touches.length&&2===B.startCount&&h.overview){var a=$({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:B.startX,y:B.startY});Math.abs(B.startSpan-a)>B.threshold&&(B.captured=!0,aB.threshold&&Math.abs(i)>Math.abs(o)?(B.captured=!0,ft()):i<-B.threshold&&Math.abs(i)>Math.abs(o)?(B.captured=!0,ht()):o>B.threshold?(B.captured=!0,vt()):o<-B.threshold&&(B.captured=!0,gt()),h.embedded?(B.captured||we(n))&&e.preventDefault():e.preventDefault()}}}function Et(e){B.captured=!1}function xt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Lt(e))}function qt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],St(e))}function Nt(e){e.pointerType!==e.MSPOINTER_TYPE_TOUCH&&"touch"!==e.pointerType||(e.touches=[{clientX:e.clientX,clientY:e.clientY}],Et())}function Mt(e){if(Date.now()-q>600){q=Date.now();var t=e.detail||-e.wheelDelta;t>0?bt():t<0&&mt()}}function It(e){wt(),e.preventDefault();var t=V(E.wrapper.querySelectorAll(d)).length,r=Math.floor(e.clientX/E.wrapper.offsetWidth*t);h.rtl&&(r=t-r),xe(r)}function Tt(e){e.preventDefault(),wt(),ft()}function Ct(e){e.preventDefault(),wt(),ht()}function Pt(e){e.preventDefault(),wt(),vt()}function Bt(e){e.preventDefault(),wt(),gt()}function Ht(e){e.preventDefault(),wt(),mt()}function Rt(e){e.preventDefault(),wt(),bt()}function Dt(e){Je()}function zt(e){le()}function Ot(e){!1===(document.webkitHidden||document.msHidden||document.hidden)&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())}function Wt(e){if(M&&be()){e.preventDefault();for(var t=e.target;t&&!t.nodeName.match(/section/gi);)t=t.parentNode;if(t&&!t.classList.contains("disabled"))if(ge(),t.nodeName.match(/section/gi))xe(parseInt(t.getAttribute("data-index-h"),10),parseInt(t.getAttribute("data-index-v"),10))}}function Ft(e){if(e.currentTarget&&e.currentTarget.hasAttribute("href")){var t=e.currentTarget.getAttribute("href");t&&(r=t,se(),E.overlay=document.createElement("div"),E.overlay.classList.add("overlay"),E.overlay.classList.add("overlay-preview"),E.wrapper.appendChild(E.overlay),E.overlay.innerHTML=["
",'','',"
",'
','
','','','Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).',"","
"].join(""),E.overlay.querySelector("iframe").addEventListener("load",function(e){E.overlay.classList.add("loaded")},!1),E.overlay.querySelector(".close").addEventListener("click",function(e){se(),e.preventDefault()},!1),E.overlay.querySelector(".external").addEventListener("click",function(e){se()},!1),setTimeout(function(){E.overlay.classList.add("visible")},1),e.preventDefault())}var r}function Ut(t){e.isLastSlide()&&!1===h.loop?(xe(0,0),pt()):P?pt():ut()}function Yt(e,t){this.diameter=100,this.diameter2=this.diameter/2,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=e,this.progressCheck=t,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}return Yt.prototype.setPlaying=function(e){var t=this.playing;this.playing=e,!t&&this.playing?this.animate():this.render()},Yt.prototype.animate=function(){var e=this.progress;this.progress=this.progressCheck(),e>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&x.requestAnimationFrameMethod.call(window,this.animate.bind(this))},Yt.prototype.render=function(){var e=this.playing?this.progress:0,t=this.diameter2-this.thickness,r=this.diameter2,a=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);var n=-Math.PI/2+e*(2*Math.PI),i=-Math.PI/2+this.progressOffset*(2*Math.PI);this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(r,a,t+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(r,a,t,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(r,a,t,i,n,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(r-14,a-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,28),this.context.fillRect(18,0,10,28)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,28),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Yt.prototype.on=function(e,t){this.canvas.addEventListener(e,t,!1)},Yt.prototype.off=function(e,t){this.canvas.removeEventListener(e,t,!1)},Yt.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},e={VERSION:"3.7.0",initialize:function(a){if(!0!==v)if(v=!0,function(){o=/(iphone|ipod|ipad|android)/gi.test(f),s=/chrome/i.test(f)&&!/edge/i.test(f);var e=document.createElement("div");x.transforms3d="WebkitPerspective"in e.style||"MozPerspective"in e.style||"msPerspective"in e.style||"OPerspective"in e.style||"perspective"in e.style,x.transforms2d="WebkitTransform"in e.style||"MozTransform"in e.style||"msTransform"in e.style||"OTransform"in e.style||"transform"in e.style,x.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,x.requestAnimationFrame="function"==typeof x.requestAnimationFrameMethod,x.canvas=!!document.createElement("canvas").getContext,x.overviewTransitions=!/Version\/[\d\.]+.*Safari/.test(f),x.zoom="zoom"in e.style&&!o&&(s||/Version\/[\d\.]+.*Safari/.test(f))}(),x.transforms2d||x.transforms3d){E.wrapper=document.querySelector(".reveal"),E.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",le,!1);var i=e.getQueryHash();"undefined"!=typeof i.dependencies&&delete i.dependencies,j(h,a),j(h,i),h.hideAddressBar&&o&&(window.addEventListener("load",te,!1),window.addEventListener("orientationchange",te,!1)),function(){var a=[],i=[],s=0;function l(){var a;i.length&&head.js.apply(null,i),g=!0,E.slides.classList.add("no-transition"),o?E.wrapper.classList.add("no-hover"):E.wrapper.classList.remove("no-hover"),/iphone/gi.test(f)?E.wrapper.classList.add("ua-iphone"):E.wrapper.classList.remove("ua-iphone"),E.background=O(E.wrapper,"div","backgrounds",null),E.progress=O(E.wrapper,"div","progress",""),E.progressbar=E.progress.querySelector("span"),E.controls=O(E.wrapper,"aside","controls",''),E.slideNumber=O(E.wrapper,"div","slide-number",""),E.speakerNotes=O(E.wrapper,"div","speaker-notes",null),E.speakerNotes.setAttribute("data-prevent-swipe",""),E.speakerNotes.setAttribute("tabindex","0"),E.pauseOverlay=O(E.wrapper,"div","pause-overlay",''),E.resumeButton=E.pauseOverlay.querySelector(".resume-button"),E.wrapper.setAttribute("role","application"),E.controlsLeft=V(document.querySelectorAll(".navigate-left")),E.controlsRight=V(document.querySelectorAll(".navigate-right")),E.controlsUp=V(document.querySelectorAll(".navigate-up")),E.controlsDown=V(document.querySelectorAll(".navigate-down")),E.controlsPrev=V(document.querySelectorAll(".navigate-prev")),E.controlsNext=V(document.querySelectorAll(".navigate-next")),E.controlsRightArrow=E.controls.querySelector(".navigate-right"),E.controlsDownArrow=E.controls.querySelector(".navigate-down"),E.statusDiv=((a=document.getElementById("aria-status-div"))||((a=document.createElement("div")).style.position="absolute",a.style.height="1px",a.style.width="1px",a.style.overflow="hidden",a.style.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","aria-status-div"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),E.wrapper.appendChild(a)),a),h.postMessage&&window.addEventListener("message",function(t){var r=t.data;"string"==typeof r&&"{"===r.charAt(0)&&"}"===r.charAt(r.length-1)&&(r=JSON.parse(r)).method&&"function"==typeof e[r.method]&&e[r.method].apply(e,r.args)},!1),setInterval(function(){0===E.wrapper.scrollTop&&0===E.wrapper.scrollLeft||(E.wrapper.scrollTop=0,E.wrapper.scrollLeft=0)},1e3),V(E.wrapper.querySelectorAll(d)).forEach(function(e){var t=V(e.querySelectorAll("section"));t.forEach(function(e,t){t>0&&(e.classList.remove("present"),e.classList.remove("past"),e.classList.add("future"),e.setAttribute("aria-hidden","true"))})}),U(),Je(),De(!0),setTimeout(function(){E.slides.classList.remove("no-transition"),E.wrapper.classList.add("ready"),re("ready",{indexh:t,indexv:r,currentSlide:n})},1),ee()&&(X(),"complete"===document.readyState?z():window.addEventListener("load",z))}function c(e){head.ready(e.src.match(/([\w\d_\-]*)\.?js(\?[\w\d.=&]*)?$|[^\\\/]*$/i)[0],function(){"function"==typeof e.callback&&e.callback.apply(this),0==--s&&l()})}for(var u=0,p=h.dependencies.length;u + +
+ +
+ diff --git a/plugin/markdown/example.md b/plugin/markdown/example.md index 6f6f577a..89c75345 100644 --- a/plugin/markdown/example.md +++ b/plugin/markdown/example.md @@ -29,3 +29,8 @@ Content 3.1 ## External 3.2 Content 3.2 + + +## External 3.3 + +![External Image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png) diff --git a/plugin/math/math.js b/plugin/math/math.js index e3b40898..78673767 100755 --- a/plugin/math/math.js +++ b/plugin/math/math.js @@ -9,15 +9,15 @@ var RevealMath = window.RevealMath || (function(){ var options = Reveal.getConfig().math || {}; 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.tex2jax = options.tex2jax || { + inlineMath: [['$','$'],['\\(','\\)']] , + skipTags: ['script','noscript','style','textarea','pre'] }; loadScript( options.mathjax + '?config=' + options.config, function() { MathJax.Hub.Config({ messageStyle: 'none', - tex2jax: { - inlineMath: [['$','$'],['\\(','\\)']] , - skipTags: ['script','noscript','style','textarea','pre'] - }, + tex2jax: options.tex2jax, skipStartupTypeset: true }); diff --git a/plugin/multiplex/package.json b/plugin/multiplex/package.json index 368bfd69..bbed77a6 100644 --- a/plugin/multiplex/package.json +++ b/plugin/multiplex/package.json @@ -2,7 +2,7 @@ "name": "reveal-js-multiplex", "version": "1.0.0", "description": "reveal.js multiplex server", - "homepage": "http://lab.hakim.se/reveal-js", + "homepage": "http://revealjs.com", "scripts": { "start": "node index.js" }, diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html index 4c5b799b..0c4eca58 100644 --- a/plugin/notes/notes.html +++ b/plugin/notes/notes.html @@ -34,6 +34,22 @@ 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 { height: 34px; line-height: 34px; @@ -288,6 +304,8 @@ +
Loading speaker view...
+
Upcoming
@@ -340,8 +358,16 @@ setupLayout(); + var connectionStatus = document.querySelector( '#connection-status' ); + var connectionTimeout = setTimeout( function() { + connectionStatus.innerHTML = 'Error connecting to main window.
Please try closing and reopening the speaker view.'; + }, 5000 ); + window.addEventListener( 'message', function( event ) { + clearTimeout( connectionTimeout ); + connectionStatus.style.display = 'none'; + var data = JSON.parse( event.data ); // The overview mode is only useful to the reveal.js instance @@ -427,10 +453,17 @@ * Forward keyboard events to the current slide window. * This enables keyboard events to work even if focus * isn't set on the current slide iframe. + * + * Block F5 default handling, it reloads and disconnects + * the speaker notes window. */ function setupKeyboard() { 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 ] }), '*' ); } ); diff --git a/plugin/notes/notes.js b/plugin/notes/notes.js index 80fb6e2a..a5b15b4b 100644 --- a/plugin/notes/notes.js +++ b/plugin/notes/notes.js @@ -21,8 +21,13 @@ var RevealNotes = (function() { 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 - notesPopup.Reveal = this.Reveal; + notesPopup.Reveal = window.Reveal; /** * 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 - document.addEventListener( 'keydown', function( event ) { - // 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(); - } - }, false ); - - // Show our keyboard shortcut in the reveal.js help overlay - if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' ); + Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes view'}, function() { + openNotes(); + } ); } diff --git a/plugin/print-pdf/print-pdf.js b/plugin/print-pdf/print-pdf.js index 9ffc261d..f62aedc8 100644 --- a/plugin/print-pdf/print-pdf.js +++ b/plugin/print-pdf/print-pdf.js @@ -2,7 +2,7 @@ * phantomjs script for printing presentations to PDF. * * 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 Hakim El Hattab (https://github.com/hakimel) @@ -42,28 +42,26 @@ probePage.open( inputFile, function( status ) { printPage.open( inputFile, function( status ) { console.log( 'Export PDF: Preparing pdf [3/4]') - printPage.evaluate(function() { + printPage.evaluate( function() { 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. // See: http://stackoverflow.com/a/3580132/129269 - setTimeout(function() { + setTimeout( function() { console.log( 'Export PDF: Writing file [4/4]' ); printPage.render( outputFile ); console.log( 'Export PDF: Finished successfully!' ); phantom.exit(); - }, 0); + }, 0 ); }; } else { - console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); - phantom.exit(1); + console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' ); + phantom.exit( 1 ); - } + } } ); - - diff --git a/plugin/search/search.js b/plugin/search/search.js index f7e5c2fe..6d694d26 100644 --- a/plugin/search/search.js +++ b/plugin/search/search.js @@ -19,92 +19,92 @@ var RevealSearch = (function() { function Hilitor(id, tag) { - var targetNode = document.getElementById(id) || document.body; - var hiliteTag = tag || "EM"; - var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$"); - var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"]; - var wordColor = []; - var colorIdx = 0; - var matchRegex = ""; - var matchingSlides = []; + var targetNode = document.getElementById(id) || document.body; + var hiliteTag = tag || "EM"; + var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$"); + var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"]; + var wordColor = []; + var colorIdx = 0; + var matchRegex = ""; + var matchingSlides = []; - this.setRegex = function(input) - { - input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|"); - matchRegex = new RegExp("(" + input + ")","i"); - } + this.setRegex = function(input) + { + input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|"); + matchRegex = new RegExp("(" + input + ")","i"); + } - this.getRegex = function() - { - return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " "); - } + this.getRegex = function() + { + return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " "); + } - // recursively apply word highlighting - this.hiliteWords = function(node) - { - if(node == undefined || !node) return; - if(!matchRegex) return; - if(skipTags.test(node.nodeName)) return; + // recursively apply word highlighting + this.hiliteWords = function(node) + { + if(node == undefined || !node) return; + if(!matchRegex) return; + if(skipTags.test(node.nodeName)) return; - if(node.hasChildNodes()) { - for(var i=0; i < node.childNodes.length; i++) - this.hiliteWords(node.childNodes[i]); - } - if(node.nodeType == 3) { // NODE_TEXT - if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) { - //find the slide's section element and save it in our list of matching slides - var secnode = node; - while (secnode != null && secnode.nodeName != 'SECTION') { - secnode = secnode.parentNode; - } + if(node.hasChildNodes()) { + for(var i=0; i < node.childNodes.length; i++) + this.hiliteWords(node.childNodes[i]); + } + if(node.nodeType == 3) { // NODE_TEXT + if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) { + //find the slide's section element and save it in our list of matching slides + var secnode = node; + while (secnode != null && secnode.nodeName != 'SECTION') { + secnode = secnode.parentNode; + } - var slideIndex = Reveal.getIndices(secnode); - var slidelen = matchingSlides.length; - var alreadyAdded = false; - for (var i=0; i < slidelen; i++) { - if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) { - alreadyAdded = true; - } - } - if (! alreadyAdded) { - matchingSlides.push(slideIndex); - } + var slideIndex = Reveal.getIndices(secnode); + var slidelen = matchingSlides.length; + var alreadyAdded = false; + for (var i=0; i < slidelen; i++) { + if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) { + alreadyAdded = true; + } + } + if (! alreadyAdded) { + matchingSlides.push(slideIndex); + } - if(!wordColor[regs[0].toLowerCase()]) { - wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length]; - } + if(!wordColor[regs[0].toLowerCase()]) { + wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length]; + } - var match = document.createElement(hiliteTag); - match.appendChild(document.createTextNode(regs[0])); - match.style.backgroundColor = wordColor[regs[0].toLowerCase()]; - match.style.fontStyle = "inherit"; - match.style.color = "#000"; + var match = document.createElement(hiliteTag); + match.appendChild(document.createTextNode(regs[0])); + match.style.backgroundColor = wordColor[regs[0].toLowerCase()]; + match.style.fontStyle = "inherit"; + match.style.color = "#000"; - var after = node.splitText(regs.index); - after.nodeValue = after.nodeValue.substring(regs[0].length); - node.parentNode.insertBefore(match, after); - } - } - }; + var after = node.splitText(regs.index); + after.nodeValue = after.nodeValue.substring(regs[0].length); + node.parentNode.insertBefore(match, after); + } + } + }; - // remove highlighting - this.remove = function() - { - var arr = document.getElementsByTagName(hiliteTag); - while(arr.length && (el = arr[0])) { - el.parentNode.replaceChild(el.firstChild, el); - } - }; + // remove highlighting + this.remove = function() + { + var arr = document.getElementsByTagName(hiliteTag); + while(arr.length && (el = arr[0])) { + el.parentNode.replaceChild(el.firstChild, el); + } + }; - // start highlighting at target node - this.apply = function(input) - { - if(input == undefined || !input) return; - this.remove(); - this.setRegex(input); - this.hiliteWords(targetNode); - return matchingSlides; - }; + // start highlighting at target node + this.apply = function(input) + { + if(input == undefined || !input) return; + this.remove(); + this.setRegex(input); + this.hiliteWords(targetNode); + return matchingSlides; + }; } @@ -150,7 +150,7 @@ function Hilitor(id, tag) } } - if (matchedSlides) { + if (matchedSlides) { //navigate to the next slide that has the keyword, wrapping to the first if necessary if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) { currentMatchedIndex = 0; @@ -169,20 +169,20 @@ function Hilitor(id, tag) var searchElement = document.createElement( 'div' ); searchElement.id = "searchinputdiv"; searchElement.classList.add( 'searchdiv' ); - searchElement.style.position = 'absolute'; - searchElement.style.top = '10px'; - searchElement.style.right = '10px'; + searchElement.style.position = 'absolute'; + searchElement.style.top = '10px'; + searchElement.style.right = '10px'; searchElement.style.zIndex = 10; - //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/: + //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/: searchElement.innerHTML = ''; dom.wrapper.appendChild( searchElement ); } - document.getElementById("searchbutton").addEventListener( 'click', function(event) { + document.getElementById( 'searchbutton' ).addEventListener( 'click', function(event) { doSearch(); }, false ); - document.getElementById("searchinput").addEventListener( 'keyup', function( event ) { + document.getElementById( 'searchinput' ).addEventListener( 'keyup', function( event ) { switch (event.keyCode) { case 13: event.preventDefault(); @@ -195,7 +195,7 @@ function Hilitor(id, tag) }, false ); 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(); toggleSearch(); }