example.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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/white.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-separator-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-separator-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. <!-- Slide attributes -->
  52. <section data-markdown>
  53. <script type="text/template">
  54. <!-- .slide: data-background="#000000" -->
  55. ## Slide attributes
  56. </script>
  57. </section>
  58. <!-- Element attributes -->
  59. <section data-markdown>
  60. <script type="text/template">
  61. ## Element attributes
  62. - Item 1 <!-- .element: class="fragment" data-fragment-index="2" -->
  63. - Item 2 <!-- .element: class="fragment" data-fragment-index="1" -->
  64. </script>
  65. </section>
  66. <!-- Code -->
  67. <section data-markdown>
  68. <script type="text/template">
  69. ```php
  70. public function foo()
  71. {
  72. $foo = array(
  73. 'bar' => 'bar'
  74. )
  75. }
  76. ```
  77. </script>
  78. </section>
  79. </div>
  80. </div>
  81. <script src="../../lib/js/head.min.js"></script>
  82. <script src="../../js/reveal.js"></script>
  83. <script>
  84. Reveal.initialize({
  85. controls: true,
  86. progress: true,
  87. history: true,
  88. center: true,
  89. // Optional libraries used to extend on reveal.js
  90. dependencies: [
  91. { src: '../../lib/js/classList.js', condition: function() { return !document.body.classList; } },
  92. { src: 'marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  93. { src: 'markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  94. { src: '../highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
  95. { src: '../notes/notes.js' }
  96. ]
  97. });
  98. </script>
  99. </body>
  100. </html>