diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-23 10:54:48 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-23 10:54:48 +0200 |
commit | b92d16f48df6e6e16c0cd5d232a3e787e59af8f9 (patch) | |
tree | a78b552b2f9f4905cbda78283f3744e01dce9cb5 /examples | |
parent | 210fbb76467d3c0da8d66f3c42bccf9ec18993b6 (diff) | |
download | fosdem-2021-minimalism-presentation-b92d16f48df6e6e16c0cd5d232a3e787e59af8f9.tar fosdem-2021-minimalism-presentation-b92d16f48df6e6e16c0cd5d232a3e787e59af8f9.tar.gz |
make plugins work with multiple presentations on same page
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multiple-presentations.html | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/examples/multiple-presentations.html b/examples/multiple-presentations.html index 125bf0a..e7965a8 100644 --- a/examples/multiple-presentations.html +++ b/examples/multiple-presentations.html @@ -10,6 +10,7 @@ <link rel="stylesheet" href="../dist/reveal.css"> <link rel="stylesheet" href="../dist/theme/white.css" id="theme"> + <link rel="stylesheet" href="../lib/css/monokai.css"> </head> <body style="background: #ddd;"> @@ -19,6 +20,14 @@ <div class="slides"> <section>Deck 1, Slide 1</section> <section>Deck 1, Slide 2</section> + <section> + <pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers> + import React, { useState } from 'react'; + function Example() { + const [count, setCount] = useState(0); + } + </code></pre> + </section> </div> </div> @@ -26,16 +35,38 @@ <div class="slides"> <section>Deck 2, Slide 1</section> <section>Deck 2, Slide 2</section> + <section data-markdown> + <script type="text/template"> + ## Markdown plugin + + - 1 + - 2 + - 3 + </script> + </section> + <section> + <h3>The Lorenz Equations</h3> + + \[\begin{aligned} + \dot{x} & = \sigma(y-x) \\ + \dot{y} & = \rho x - y - xz \\ + \dot{z} & = -\beta z + xy + \end{aligned} \] + </section> </div> </div> </div> <script src="../dist/reveal.es5.js"></script> + <script src="../dist/plugin/highlight.js"></script> + <script src="../dist/plugin/markdown.js"></script> + <script src="../dist/plugin/math.js"></script> <script> let deck1 = new Reveal( document.querySelector( '.deck1' ), { embedded: true, - keyboard: false + keyboard: false, + plugins: [ RevealHighlight ] } ); deck1.on( 'slidechanged', () => { console.log( 'Deck 1 slide changed' ); @@ -44,7 +75,8 @@ let deck2 = new Reveal( document.querySelector( '.deck2' ), { embedded: true, - keyboard: false + keyboard: true, + plugins: [ RevealMarkdown, RevealMath ] } ); deck2.initialize().then( () => { deck2.slide(1); |