example.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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/monokai.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. <!-- Images -->
  80. <section data-markdown>
  81. <script type="text/template">
  82. ![Sample image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png)
  83. </script>
  84. </section>
  85. </div>
  86. </div>
  87. <script src="../../js/reveal.js"></script>
  88. <script>
  89. Reveal.initialize({
  90. controls: true,
  91. progress: true,
  92. history: true,
  93. center: true,
  94. // Optional libraries used to extend on reveal.js
  95. dependencies: [
  96. { src: 'marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  97. { src: 'markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
  98. { src: '../highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
  99. { src: '../notes/notes.js' }
  100. ]
  101. });
  102. </script>
  103. </body>
  104. </html>