multiple-presentations.html 2.6 KB

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