example.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Markdown Demo</title>
  6. <link rel="stylesheet" href="../../css/reveal.css">
  7. <link rel="stylesheet" href="../../css/theme/default.css" id="theme">
  8. <link rel="stylesheet" href="../../lib/css/zenburn.css">
  9. </head>
  10. <body>
  11. <div class="reveal">
  12. <div class="slides">
  13. <!-- Use external markdown resource, separate slides by three newlines; vertical slides by two newlines -->
  14. <section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n"></section>
  15. <!-- Slides are separated by three dashes (quick 'n dirty regular expression) -->
  16. <section data-markdown data-separator="---">
  17. <script type="text/template">
  18. ## Demo 1
  19. Slide 1
  20. ---
  21. ## Demo 1
  22. Slide 2
  23. ---
  24. ## Demo 1
  25. Slide 3
  26. </script>
  27. </section>
  28. <!-- Slides are separated by newline + three dashes + newline, vertical slides identical but two dashes -->
  29. <section data-markdown data-separator="^\n---\n$" data-vertical="^\n--\n$">
  30. <script type="text/template">
  31. ## Demo 2
  32. Slide 1.1
  33. --
  34. ## Demo 2
  35. Slide 1.2
  36. ---
  37. ## Demo 2
  38. Slide 2
  39. </script>
  40. </section>
  41. <!-- No "extra" slides, since there are no separators defined (so they'll become horizontal rulers) -->
  42. <section data-markdown>
  43. <script type="text/template">
  44. A
  45. ---
  46. B
  47. ---
  48. C
  49. </script>
  50. </section>
  51. <!-- Code -->
  52. <section>
  53. <section data-markdown>
  54. <script type="text/template">
  55. ```php
  56. public function foo()
  57. {
  58. $foo = array(
  59. 'bar' => 'bar'
  60. )
  61. }
  62. ```
  63. </script>
  64. </section>
  65. </section>
  66. </div>
  67. </div>
  68. <script src="../../lib/js/head.min.js"></script>
  69. <script src="../../js/reveal.js"></script>
  70. <script>
  71. Reveal.initialize({
  72. controls: true,
  73. progress: true,
  74. history: true,
  75. center: true,
  76. // Optional libraries used to extend on reveal.js
  77. dependencies: [
  78. { src: '../../lib/js/classList.js', condition: function() { return !document.body.classList; } },
  79. { src: 'marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  80. { src: 'markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  81. { src: '../highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
  82. { src: '../notes/notes.js' }
  83. ]
  84. });
  85. </script>
  86. </body>
  87. </html>