scroll.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Scroll View</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/reset.css">
  8. <link rel="stylesheet" href="../dist/reveal.css">
  9. <link rel="stylesheet" href="../dist/theme/black.css" id="theme">
  10. <link rel="stylesheet" href="../plugin/highlight/monokai.css">
  11. </head>
  12. <body>
  13. <div class="reveal">
  14. <div class="slides">
  15. <section><h1>Scroll View</h1></section>
  16. <section data-background="indigo">
  17. <h2>Scroll triggered fragments</h2>
  18. <ul>
  19. <li class="fragment fade-left">Step one</li>
  20. <li class="fragment fade-left">Step two</li>
  21. <li class="fragment fade-left">Step three</li>
  22. </ul>
  23. </section>
  24. <section data-background-color="#fff"><h2>Scrollbar inverts<br>based on slide bg</h2></section>
  25. <section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
  26. <h2>Auto-Animate</h2>
  27. <p>Scroll triggered auto-animations 😍</p>
  28. <div class="r-hstack justify-center">
  29. <div data-id="box1" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
  30. <div data-id="box2" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
  31. <div data-id="box3" style="background: #999; width: 50px; height: 50px; margin: 10px; border-radius: 5px;"></div>
  32. </div>
  33. </section>
  34. <section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
  35. <div class="r-hstack justify-center">
  36. <div data-id="box1" data-auto-animate-delay="0" style="background: cyan; width: 150px; height: 100px; margin: 10px;"></div>
  37. <div data-id="box2" data-auto-animate-delay="0.1" style="background: magenta; width: 150px; height: 100px; margin: 10px;"></div>
  38. <div data-id="box3" data-auto-animate-delay="0.2" style="background: yellow; width: 150px; height: 100px; margin: 10px;"></div>
  39. </div>
  40. <h2 style="margin-top: 20px;">Auto-Animate</h2>
  41. </section>
  42. <section data-auto-animate data-auto-animate-easing="cubic-bezier(0.770, 0.000, 0.175, 1.000)">
  43. <div class="r-stack">
  44. <div data-id="box1" style="background: cyan; width: 300px; height: 300px; border-radius: 200px;"></div>
  45. <div data-id="box2" style="background: magenta; width: 200px; height: 200px; border-radius: 200px;"></div>
  46. <div data-id="box3" style="background: yellow; width: 100px; height: 100px; border-radius: 200px;"></div>
  47. </div>
  48. <h2 style="margin-top: 20px;">Auto-Animate</h2>
  49. </section>
  50. <section data-background-gradient="linear-gradient(to bottom, #283b95, #17b2c3)" id="gradient-bg">
  51. <h2 data-id="code-title">Code highlights,<br />meet scroll triggers</h2>
  52. <pre data-id="code-animation"><code class="hljs javascript" data-trim data-line-numbers="|4,8-11|17|22-24"><script type="text/template">
  53. import React, { useState } from 'react';
  54. function Example() {
  55. const [count, setCount] = useState(0);
  56. return (
  57. <div>
  58. <p>You clicked {count} times</p>
  59. <button onClick={() => setCount(count + 1)}>
  60. Click me
  61. </button>
  62. </div>
  63. );
  64. }
  65. function SecondExample() {
  66. const [count, setCount] = useState(0);
  67. return (
  68. <div>
  69. <p>You clicked {count} times</p>
  70. <button onClick={() => setCount(count + 1)}>
  71. Click me
  72. </button>
  73. </div>
  74. );
  75. }
  76. </script></code></pre>
  77. </section>
  78. <section class="stack">
  79. <section data-background="https://static.slid.es/reveal/image-placeholder.png" id="image-bg">
  80. <h2>Image Backgrounds</h2>
  81. </section>
  82. <section data-background-video-muted data-background-video="https://static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://static.slid.es/site/homepage/v1/homepage-video-editor.webm">
  83. <div style="background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;">
  84. <h2>Video background</h2>
  85. </div>
  86. </section>
  87. </section>
  88. <section><h2>The end</h2></section>
  89. </div>
  90. </div>
  91. <script src="../dist/reveal.js"></script>
  92. <script src="../plugin/notes/notes.js"></script>
  93. <script src="../plugin/markdown/markdown.js"></script>
  94. <script src="../plugin/highlight/highlight.js"></script>
  95. <script>
  96. Reveal.initialize({
  97. view: 'scroll',
  98. hash: true,
  99. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
  100. });
  101. </script>
  102. </body>
  103. </html>