layout-helpers.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>reveal.js - Layout Helpers</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>
  15. <div class="reveal">
  16. <div class="slides">
  17. <section>
  18. <h2>Layout Helper Examples</h2>
  19. <ul>
  20. <li><a href="#/fit-text">Big Text</a></li>
  21. <li><a href="#/stretch">Stretch</a></li>
  22. <li><a href="#/stack">Stack</a></li>
  23. <li><a href="#/hstack">HStack</a></li>
  24. <li><a href="#/vstack">VStack</a></li>
  25. </ul>
  26. </section>
  27. <section id="fit-text">
  28. <h2>Fit Text</h2>
  29. <p>Resizes text to be as large as possible within its container.</p>
  30. <pre><code class="html" data-trim data-line-numbers>
  31. <h2 class="r-fit-text">FIT</h2>
  32. </code></pre>
  33. </section>
  34. <section>
  35. <h2 class="r-fit-text">FIT</h2>
  36. </section>
  37. <section>
  38. <h2 class="r-fit-text">HELLO WORLD</h2>
  39. <h2 class="r-fit-text">BOTH THESE TITLES USE FIT-TEXT</h2>
  40. </section>
  41. <section id="stretch">
  42. <h2>Stretch</h2>
  43. <p>Makes an element as tall as possible while remaining within the slide bounds.</p>
  44. <pre><code class="html" data-trim data-line-numbers>
  45. <h2>Stretch Example</h2>
  46. <img src="assets/image2.png" class="r-stretch">
  47. <p>Image byline</p>
  48. </code></pre>
  49. </section>
  50. <section>
  51. <h2>Stretch Example</h2>
  52. <img src="assets/image2.png" class="r-stretch" />
  53. <p>Image byline</p>
  54. </section>
  55. <section id="stack">
  56. <h2>Stack</h2>
  57. <p>Stacks multiple elements on top of each other, for use with fragments.</p>
  58. <pre><code class="html" data-trim data-line-numbers>
  59. <div class="r-stack">
  60. &lt;img class="fragment" width="450" height="300" src="..."&gt;
  61. &lt;img class="fragment" width="300" height="450" src="..."&gt;
  62. &lt;img class="fragment" width="400" height="400" src="..."&gt;
  63. </div>
  64. </code></pre>
  65. </section>
  66. <section>
  67. <h2>Stack Example</h2>
  68. <div class="r-stack">
  69. <p class="fragment fade-in-then-out">One</p>
  70. <p class="fragment fade-in-then-out">Two</p>
  71. <p class="fragment fade-in-then-out">Three</p>
  72. <p class="fragment fade-in-then-out">Four</p>
  73. </div>
  74. <div class="r-stack">
  75. <img src="https://placekitten.com/450/300" width="450" height="300" class="fragment" />
  76. <img src="https://placekitten.com/300/450" width="300" height="450" class="fragment" />
  77. <img src="https://placekitten.com/400/400" width="400" height="400" class="fragment" />
  78. </div>
  79. </section>
  80. <section>
  81. <h2>Stack Example</h2>
  82. <p>fade-in-then-out fragments</p>
  83. <div class="r-stack">
  84. <img
  85. src="https://placekitten.com/450/300"
  86. width="450"
  87. height="300"
  88. class="fragment fade-in-then-out"
  89. />
  90. <img
  91. src="https://placekitten.com/300/450"
  92. width="300"
  93. height="450"
  94. class="fragment fade-in-then-out"
  95. />
  96. <img
  97. src="https://placekitten.com/400/400"
  98. width="400"
  99. height="400"
  100. class="fragment fade-in-then-out"
  101. />
  102. </div>
  103. </section>
  104. <section id="hstack">
  105. <h2>HStack</h2>
  106. <p>Stacks multiple elements horizontally.</p>
  107. <pre><code class="html" data-trim data-line-numbers>
  108. <div class="r-hstack">
  109. &lt;img width="450" height="300" src="..."&gt;
  110. &lt;img width="300" height="450" src="..."&gt;
  111. &lt;img width="400" height="400" src="..."&gt;
  112. </div>
  113. </code></pre>
  114. </section>
  115. <section data-auto-animate>
  116. <h2>HStack Example</h2>
  117. <div class="r-hstack">
  118. <p style="padding: 0.5em; background: #eee; margin: 0.25em">One</p>
  119. <p style="padding: 0.75em; background: #eee; margin: 0.25em">Two</p>
  120. <p style="padding: 1em; background: #eee; margin: 0.25em">Three</p>
  121. </div>
  122. </section>
  123. <section id="vstack">
  124. <h2>VStack</h2>
  125. <p>Stacks multiple elements vertically.</p>
  126. <pre><code class="html" data-trim data-line-numbers>
  127. <div class="r-vstack">
  128. &lt;img width="450" height="300" src="..."&gt;
  129. &lt;img width="300" height="450" src="..."&gt;
  130. &lt;img width="400" height="400" src="..."&gt;
  131. </div>
  132. </code></pre>
  133. </section>
  134. <section data-auto-animate>
  135. <h2>VStack Example</h2>
  136. <div class="r-vstack">
  137. <p style="padding: 0.5em; background: #eee; margin: 0.25em">One</p>
  138. <p style="padding: 0.75em; background: #eee; margin: 0.25em">Two</p>
  139. <p style="padding: 1em; background: #eee; margin: 0.25em">Three</p>
  140. </div>
  141. </section>
  142. </div>
  143. </div>
  144. <script src="../dist/reveal.js"></script>
  145. <script src="../dist/plugin/highlight.js"></script>
  146. <script>
  147. Reveal.initialize({
  148. center: true,
  149. hash: true,
  150. plugins: [RevealHighlight],
  151. });
  152. </script>
  153. </body>
  154. </html>