multiple-instances.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Multiple Instances</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  7. <link rel="stylesheet" href="../../dist/reveal.css">
  8. <link rel="stylesheet" href="../../dist/theme/white.css" id="theme">
  9. </head>
  10. <body style="background: #ddd;">
  11. <div style="display: flex; flex-direction: row;">
  12. <div class="reveal deck1" style="width: 100%; height: 50vh; margin: 10px;">
  13. <div class="slides">
  14. <section data-markdown>
  15. <script type="text/template">
  16. ## Slide attributes
  17. </script>
  18. </section>
  19. <section>1.2</section>
  20. <section>1.3</section>
  21. </div>
  22. </div>
  23. <div class="reveal deck2" style="width: 100%; height: 50vh; margin: 10px;">
  24. <div class="slides">
  25. <section data-markdown>
  26. <script type="text/template">
  27. ## Slide attributes
  28. </script>
  29. </section>
  30. <section>2.2</section>
  31. <section>2.3</section>
  32. </div>
  33. </div>
  34. </div>
  35. <script type="module">
  36. import Reveal from '../../js/reveal.js';
  37. import Markdown from '../../plugin/markdown/markdown.js';
  38. let r1 = new Reveal( document.querySelector( '.deck1' ), {
  39. embedded: true,
  40. keyboard: false
  41. } );
  42. r1.initialize().then( () => {
  43. let r2 = new Reveal( document.querySelector( '.deck2' ), {
  44. embedded: true,
  45. keyboard: false,
  46. dependencies: [ Markdown ]
  47. } );
  48. r2.initialize();
  49. } );
  50. </script>
  51. </body>
  52. </html>