blob: e5347d4a25c4b2c076a97864abce5241ec8dc9e3 [file] [log] [blame]
Christophe Dervieuxe1893ae2021-10-07 17:09:02 +02001<!doctype html>
2<html lang="en">
3
4 <head>
5 <meta charset="utf-8">
6
7 <title>reveal.js - Multiple Presentations</title>
8
9 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
10
11 <link rel="stylesheet" href="../dist/reveal.css">
12 <link rel="stylesheet" href="../dist/theme/white.css" id="theme">
13 <link rel="stylesheet" href="../plugin/highlight/monokai.css">
14 </head>
15
16 <body style="background: #ddd;">
17
18 <div style="display: flex; flex-direction: row;">
19 <div class="reveal deck1" style="width: 100%; height: 50vh; margin: 10px;">
20 <div class="slides">
21 <section>Deck 1, Slide 1</section>
22 <section>Deck 1, Slide 2</section>
23 <section>
24 <pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers>
25 import React, { useState } from 'react';
26 function Example() {
27 const [count, setCount] = useState(0);
28 }
29 </code></pre>
30 </section>
31 </div>
32 </div>
33
34 <div class="reveal deck2" style="width: 100%; height: 50vh; margin: 10px;">
35 <div class="slides">
36 <section>Deck 2, Slide 1</section>
37 <section>Deck 2, Slide 2</section>
38 <section data-markdown>
39 <script type="text/template">
40 ## Markdown plugin
41
42 - 1
43 - 2
44 - 3
45 </script>
46 </section>
47 <section>
48 <h3>The Lorenz Equations</h3>
49
50 \[\begin{aligned}
51 \dot{x} &amp; = \sigma(y-x) \\
52 \dot{y} &amp; = \rho x - y - xz \\
53 \dot{z} &amp; = -\beta z + xy
54 \end{aligned} \]
55 </section>
56 </div>
57 </div>
58 </div>
59
60 <style>
61 .reveal {
62 border: 4px solid #ccc;
63 }
64 .reveal.focused {
65 border-color: #94b5ff;
66 }
67 </style>
68
69 <script src="../dist/reveal.js"></script>
70 <script src="../plugin/highlight/highlight.js"></script>
71 <script src="../plugin/markdown/markdown.js"></script>
72 <script src="../plugin/math/math.js"></script>
73 <script>
74
75 let deck1 = new Reveal( document.querySelector( '.deck1' ), {
76 embedded: true,
77 progress: false,
78 keyboardCondition: 'focused',
79 plugins: [ RevealHighlight ]
80 } );
81 deck1.on( 'slidechanged', () => {
82 console.log( 'Deck 1 slide changed' );
83 } );
84 deck1.initialize();
85
86 let deck2 = new Reveal( document.querySelector( '.deck2' ), {
87 embedded: true,
88 progress: false,
89 keyboardCondition: 'focused',
90 plugins: [ RevealMarkdown, RevealMath ]
91 } );
92 deck2.initialize().then( () => {
93 deck2.slide(1);
94 } );
95 deck2.on( 'slidechanged', () => {
96 console.log( 'Deck 2 slide changed' );
97 } );
98
99 </script>
100
101 </body>
102</html>