diff options
| author | Juan Marin Noguera <juan@mnpi.eu> | 2023-08-22 17:56:56 +0200 | 
|---|---|---|
| committer | Juan Marin Noguera <juan@mnpi.eu> | 2023-08-22 17:56:56 +0200 | 
| commit | 1fd2213192d22880706440e7f724bdc6db966ee0 (patch) | |
| tree | ff2d6812ef6db399852ad8c4cf2b6f1cd417dfed /present/examples | |
| parent | 2f9eb7a94819a08937ba08320a142b7f0be407fd (diff) | |
Añadida presentación1.0
Diffstat (limited to 'present/examples')
| -rw-r--r-- | present/examples/assets/beeping.txt | 2 | ||||
| -rw-r--r-- | present/examples/assets/beeping.wav | bin | 0 -> 422472 bytes | |||
| -rw-r--r-- | present/examples/assets/image1.png | bin | 0 -> 21991 bytes | |||
| -rw-r--r-- | present/examples/assets/image2.png | bin | 0 -> 10237 bytes | |||
| -rw-r--r-- | present/examples/auto-animate.html | 225 | ||||
| -rw-r--r-- | present/examples/backgrounds.html | 141 | ||||
| -rw-r--r-- | present/examples/barebones.html | 32 | ||||
| -rw-r--r-- | present/examples/layout-helpers.html | 160 | ||||
| -rw-r--r-- | present/examples/markdown.html | 161 | ||||
| -rw-r--r-- | present/examples/markdown.md | 41 | ||||
| -rw-r--r-- | present/examples/math.html | 206 | ||||
| -rw-r--r-- | present/examples/media.html | 75 | ||||
| -rw-r--r-- | present/examples/multiple-presentations.html | 102 | ||||
| -rw-r--r-- | present/examples/transitions.html | 97 | 
14 files changed, 1242 insertions, 0 deletions
| diff --git a/present/examples/assets/beeping.txt b/present/examples/assets/beeping.txt new file mode 100644 index 0000000..bf41997 --- /dev/null +++ b/present/examples/assets/beeping.txt @@ -0,0 +1,2 @@ +Source: https://freesound.org/people/fennelliott/sounds/379419/ +License: CC0 (public domain)
\ No newline at end of file diff --git a/present/examples/assets/beeping.wav b/present/examples/assets/beeping.wavBinary files differ new file mode 100644 index 0000000..38747a5 --- /dev/null +++ b/present/examples/assets/beeping.wav diff --git a/present/examples/assets/image1.png b/present/examples/assets/image1.pngBinary files differ new file mode 100644 index 0000000..8747594 --- /dev/null +++ b/present/examples/assets/image1.png diff --git a/present/examples/assets/image2.png b/present/examples/assets/image2.pngBinary files differ new file mode 100644 index 0000000..6c403a0 --- /dev/null +++ b/present/examples/assets/image2.png diff --git a/present/examples/auto-animate.html b/present/examples/auto-animate.html new file mode 100644 index 0000000..199810e --- /dev/null +++ b/present/examples/auto-animate.html @@ -0,0 +1,225 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Auto Animate</title> + +		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/black.css" id="theme"> +		<link rel="stylesheet" href="../plugin/highlight/monokai.css"> +	</head> + +	<body> + +		<div class="reveal"> + +			<div class="slides"> +				<section data-auto-animate data-auto-animate-unmatched="fade"> +					<h3>Auto-Animate Example</h3> +					<p>This will fade out</p> +					<img src="assets/image1.png" style="height: 100px;"> +					<pre data-id="code"><code data-line-numbers class="hljs" data-trim> +						function Example() { +						  const [count, setCount] = useState(0); +						} +					</code></pre> +				</section> +				<section data-auto-animate data-auto-animate-unmatched="fade"> +					<h3>Auto-Animate Example</h3> +					<p style="opacity: 0.2; margin-top: 100px;">This will fade out</p> +					<p>This element is unmatched</p> +					<img src="assets/image1.png" style="height: 150px;"> +					<pre data-id="code"><code data-line-numbers class="hljs" data-trim> +						function Example() { +						  New line! +						  const [count, setCount] = useState(0); +						} +					</code></pre> +				</section> + +				<section data-auto-animate> +					<p data-id="text-props" style="background: #555; line-height: 1em; letter-spacing: 0em;">Line Height & Letter Spacing</p> +				</section> +				<section data-auto-animate> +					<p data-id="text-props" style="background: #555; line-height: 3em; letter-spacing: 0.2em;">Line Height & Letter Spacing</p> +				</section> + +				<section> +					<section data-auto-animate> +						<pre data-id="code"><code data-line-numbers class="hljs" data-trim> +							import React, { useState } from 'react'; + +							function Example() { +							  const [count, setCount] = useState(0); + +							  return ( +							    ... +							  ); +							} +						</code></pre> +					</section> +					<section data-auto-animate> +						<pre data-id="code"><code data-line-numbers class="hljs" data-trim> +							function Example() { +							  const [count, setCount] = useState(0); + +							  return ( +							    <div> +							      <p>You clicked {count} times</p> +							      <button onClick={() => setCount(count + 1)}> +							        Click me +							      </button> +							    </div> +							  ); +							} +						</code></pre> +					</section> +					<section data-auto-animate> +						<pre data-id="code"><code data-line-numbers class="hljs" data-trim> +							function Example() { +							  // A comment! +							  const [count, setCount] = useState(0); + +							  return ( +							    <div> +							      <p>You clicked {count} times</p> +							      <button onClick={() => setCount(count + 1)}> +							        Click me +							      </button> +							    </div> +							  ); +							} +						</code></pre> +					</section> +				</section> + +				<section> +					<section data-auto-animate> +						<h3>Swapping list items</h3> +						<ul> +							<li>One</li> +							<li>Two</li> +							<li>Three</li> +						</ul> +					</section> +					<section data-auto-animate> +						<h3>Swapping list items</h3> +						<ul> +							<li>Two</li> +							<li>One</li> +							<li>Three</li> +						</ul> +					</section> +					<section data-auto-animate> +						<h3>Swapping list items</h3> +						<ul> +							<li>Two</li> +							<li>Three</li> +							<li>One</li> +						</ul> +					</section> +				</section> + +				<section data-auto-animate style="height: 600px"> +					<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 1</h3> +					<h2 data-id="title" style="margin-top: 260px;">Animate Anything</h2> +					<div data-id="1" style="background: white; position: absolute; top: 150px; left: 16%; width: 60px; height: 60px;"></div> +					<div data-id="2" style="background: white; position: absolute; top: 150px; left: 36%; width: 60px; height: 60px;"></div> +					<div data-id="3" style="background: white; position: absolute; top: 150px; left: 56%; width: 60px; height: 60px;"></div> +					<div data-id="4" style="background: white; position: absolute; top: 150px; left: 76%; width: 60px; height: 60px;"></div> +				</section> +				<section data-auto-animate style="height: 600px"> +					<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 2</h3> +					<h2 data-id="title" style="margin-top: 500px">With Auto Animate</h2> +					<div data-id="1" style="background: cyan; position: absolute; bottom: 190px; left: 16%; width: 60px; height: 60px;"></div> +					<div data-id="2" style="background: magenta; position: absolute; bottom: 190px; left: 36%; width: 60px; height: 160px;"></div> +					<div data-id="3" style="background: yellow; position: absolute; bottom: 190px; left: 56%; width: 60px; height: 260px;"></div> +					<div data-id="4" style="background: red; position: absolute; bottom: 190px; left: 76%; width: 60px; height: 360px;"></div> +				</section> +				<section data-auto-animate style="height: 600px"> +					<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 3</h3> +					<h2 data-id="title" style="margin-top: 500px; opacity: 0;">With Auto Animate</h2> +					<div data-id="1" style="background: cyan; position: absolute; top: 50%; left: 50%; width: 400px; height: 400px; margin: -200px 0 0 -200px; border-radius: 400px;"></div> +					<div data-id="2" style="background: magenta; position: absolute; top: 50%; left: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 400px;"></div> +					<div data-id="3" style="background: yellow; position: absolute; top: 50%; left: 50%; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 400px;"></div> +					<div data-id="4" style="background: red; position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 400px;"></div> +				</section> +				<section data-auto-animate style="height: 600px"> +					<h3 style="opacity: 0.3; font-size: 18px;">SLIDE 3</h3> +					<h2 data-id="title" style="margin-top: 500px; opacity: 0;">With Auto Animate</h2> +					<div data-id="1" style="background: red; position: absolute; top: 250px; left: 16%; width: 60px; height: 60px;"></div> +					<div data-id="2" style="background: yellow; position: absolute; top: 250px; left: 36%; width: 60px; height: 60px;"></div> +					<div data-id="3" style="background: magenta; position: absolute; top: 250px; left: 56%; width: 60px; height: 60px;"></div> +					<div data-id="4" style="background: cyan; position: absolute; top: 250px; left: 76%; width: 60px; height: 60px;"></div> +				</section> + +				<section data-auto-animate data-auto-animate-id="a"> +					<h2>data-auto-animate-id="a"</h2> +					<h3>A1</h3> +				</section> +				<section data-auto-animate data-auto-animate-id="a"> +					<h2>data-auto-animate-id="a"</h2> +					<h3>A1</h3> +					<h3>A2</h3> +				</section> +				<section data-auto-animate data-auto-animate-id="b"> +					<h2>data-auto-animate-id="b"</h2> +					<h3>B1</h3> +				</section> +				<section data-auto-animate data-auto-animate-id="b"> +					<h2>data-auto-animate-id="b"</h2> +					<h3>B1</h3> +					<h3>B2</h3> +				</section> + +				<section> +					<section id="stacked-slide-1" data-auto-animate> +						<a href="#/stacked-slide-1">Slide 1</a><br> +						<a href="#/stacked-slide-2">Slide 2</a><br> +						<a href="#/stacked-slide-3">Slide 3</a><br> +						<a href="#/stacked-slide-4">Slide 4</a><br> +						<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 0px;">A</div> +					</section> +					<section id="stacked-slide-2" data-auto-animate> +						<a href="#/stacked-slide-1">Slide 1</a><br> +						<a href="#/stacked-slide-2">Slide 2</a><br> +						<a href="#/stacked-slide-3">Slide 3</a><br> +						<a href="#/stacked-slide-4">Slide 4</a><br> +						<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 25%;">A</div> +					</section> +					<section id="stacked-slide-3" data-auto-animate> +						<a href="#/stacked-slide-1">Slide 1</a><br> +						<a href="#/stacked-slide-2">Slide 2</a><br> +						<a href="#/stacked-slide-3">Slide 3</a><br> +						<a href="#/stacked-slide-4">Slide 4</a><br> +						<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 50%;">A</div> +					</section> +					<section id="stacked-slide-4" data-auto-animate> +						<a href="#/stacked-slide-1">Slide 1</a><br> +						<a href="#/stacked-slide-2">Slide 2</a><br> +						<a href="#/stacked-slide-3">Slide 3</a><br> +						<a href="#/stacked-slide-4">Slide 4</a><br> +						<div data-id="anim" style="background: indigo; padding: 8px; width: 50px; height: 50px; position: absolute; left: 75%;">A</div> +					</section> +				</section> + +			</div> + +		</div> + +		<script src="../dist/reveal.js"></script> +		<script src="../plugin/highlight/highlight.js"></script> +		<script> +			Reveal.initialize({ +				center: true, +				hash: true, +				plugins: [ RevealHighlight ] +			}); +		</script> + +	</body> +</html> diff --git a/present/examples/backgrounds.html b/present/examples/backgrounds.html new file mode 100644 index 0000000..19d40c3 --- /dev/null +++ b/present/examples/backgrounds.html @@ -0,0 +1,141 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Slide Backgrounds</title> + +		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/serif.css" id="theme"> +		<style type="text/css" media="screen"> +			.slides section.has-dark-background, +			.slides section.has-dark-background h2 { +				color: #fff; +			} +			.slides section.has-light-background, +			.slides section.has-light-background h2 { +				color: #222; +			} +		</style> +	</head> + +	<body> + +		<div class="reveal"> + +			<div class="slides"> + +				<section data-background="#00ffff"> +					<h2>data-background: #00ffff</h2> +				</section> + +				<section data-background="#bb00bb"> +					<h2>data-background: #bb00bb</h2> +				</section> + +				<section data-background-color="lightblue"> +					<h2>data-background: lightblue</h2> +				</section> + +				<section> +					<section data-background="#ff0000"> +						<h2>data-background: #ff0000</h2> +					</section> +					<section data-background="rgba(0, 0, 0, 0.2)"> +						<h2>data-background: rgba(0, 0, 0, 0.2)</h2> +					</section> +					<section data-background="salmon"> +						<h2>data-background: salmon</h2> +					</section> +				</section> + +				<section data-background="rgba(0, 100, 100, 0.2)"> +					<section> +						<h2>Background applied to stack</h2> +					</section> +					<section> +						<h2>Background applied to stack</h2> +					</section> +					<section data-background="rgb(66, 66, 66)"> +						<h2>Background applied to slide inside of stack</h2> +					</section> +				</section> + +				<section data-background-transition="slide" data-background="assets/image1.png"> +					<h2>Background image</h2> +				</section> + +				<section> +					<section data-background-transition="slide" data-background="assets/image1.png"> +						<h2>Background image</h2> +					</section> +					<section data-background-transition="slide" data-background="assets/image1.png"> +						<h2>Background image</h2> +					</section> +				</section> + +				<section data-background="assets/image2.png" data-background-size="100px" data-background-repeat="repeat" data-background-color="#111"> +					<h2>Background image</h2> +					<pre>data-background-size="100px" data-background-repeat="repeat" data-background-color="#111"</pre> +				</section> + +				<section data-background="#888888"> +					<h2>Same background twice (1/2)</h2> +				</section> +				<section data-background="#888888"> +					<h2>Same background twice (2/2)</h2> +				</section> + +				<section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm"> +					<h2>Video background</h2> +				</section> + +				<section data-background-iframe="https://slides.com/news/make-better-presentations/embed?style=hidden&autoSlide=4000"> +					<h2>Iframe background</h2> +				</section> + +				<section> +					<section data-background="#417203"> +						<h2>Same background twice vertical (1/2)</h2> +					</section> +					<section data-background="#417203"> +						<h2>Same background twice vertical (2/2)</h2> +					</section> +				</section> + +				<section data-background="#934f4d"> +					<h2>Same background from horizontal to vertical (1/3)</h2> +				</section> +				<section> +					<section data-background="#934f4d"> +						<h2>Same background from horizontal to vertical (2/3)</h2> +					</section> +					<section data-background="#934f4d"> +						<h2>Same background from horizontal to vertical (3/3)</h2> +					</section> +				</section> + +			</div> + +		</div> + +		<script src="../dist/reveal.js"></script> +		<script> + +			// Full list of configuration options: +			// https://revealjs.revealjs.com/config/ +			Reveal.initialize({ +				center: true, + +				transition: 'linear', +				// transitionSpeed: 'slow', +				// backgroundTransition: 'slide' +			}); + +		</script> + +	</body> +</html> diff --git a/present/examples/barebones.html b/present/examples/barebones.html new file mode 100644 index 0000000..50adcb8 --- /dev/null +++ b/present/examples/barebones.html @@ -0,0 +1,32 @@ +<!doctype html> +<html lang="en"> +	<head> +		<meta charset="utf-8"> +		<title>reveal.js - Barebones</title> +		<link rel="stylesheet" href="../dist/reveal.css"> +	</head> +	<body> + +		<div class="reveal"> +			<div class="slides"> + +				<section> +					<h2>Barebones Presentation</h2> +					<p>This example contains the bare minimum includes and markup required to run a reveal.js presentation.</p> +				</section> + +				<section> +					<h2>No Theme</h2> +					<p>There's no theme included, so it will fall back on browser defaults.</p> +				</section> + +			</div> +		</div> + +		<script src="../dist/reveal.js"></script> +		<script> +			Reveal.initialize(); +		</script> + +	</body> +</html> diff --git a/present/examples/layout-helpers.html b/present/examples/layout-helpers.html new file mode 100644 index 0000000..a129811 --- /dev/null +++ b/present/examples/layout-helpers.html @@ -0,0 +1,160 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Layout Helpers</title> + +		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/white.css" id="theme"> +		<link rel="stylesheet" href="../plugin/highlight/monokai.css"> +	</head> + +	<body> + +		<div class="reveal"> + +			<div class="slides"> + +				<section> +					<h2>Layout Helper Examples</h2> +					<ul> +						<li><a href="#/fit-text">Big Text</a></li> +						<li><a href="#/stretch">Stretch</a></li> +						<li><a href="#/stack">Stack</a></li> +						<li><a href="#/hstack">HStack</a></li> +						<li><a href="#/vstack">VStack</a></li> +					</ul> +				</section> + +				<section id="fit-text"> +					<h2>Fit Text</h2> +					<p>Resizes text to be as large as possible within its container.</p> +					<pre><code class="html" data-trim data-line-numbers> +					  <h2 class="r-fit-text">FIT</h2> +					</code></pre> +				</section> + +				<section> +					<h2 class="r-fit-text">FIT</h2> +				</section> + +				<section> +					<h2 class="r-fit-text">HELLO WORLD</h2> +					<h2 class="r-fit-text">BOTH THESE TITLES USE FIT-TEXT</h2> +				</section> + +				<section id="stretch"> +					<h2>Stretch</h2> +					<p>Makes an element as tall as possible while remaining within the slide bounds.</p> +					<pre><code class="html" data-trim data-line-numbers> +					  <h2>Stretch Example</h2> +					  <img src="assets/image2.png" class="r-stretch"> +					  <p>Image byline</p> +					</code></pre> +				</section> + +				<section> +					<h2>Stretch Example</h2> +					<img src="assets/image2.png" class="r-stretch"> +					<p>Image byline</p> +				</section> + +				<section id="stack"> +					<h2>Stack</h2> +					<p>Stacks multiple elements on top of each other, for use with fragments.</p> +					<pre><code class="html" data-trim data-line-numbers> +					  <div class="r-stack"> +					    <img class="fragment" width="450" height="300" src="..."> +					    <img class="fragment" width="300" height="450" src="..."> +					    <img class="fragment" width="400" height="400" src="..."> +					  </div> +					</code></pre> +				</section> + +				<section> +					<h2>Stack Example</h2> +					<div class="r-stack"> +						<p class="fragment fade-in-then-out">One</p> +						<p class="fragment fade-in-then-out">Two</p> +						<p class="fragment fade-in-then-out">Three</p> +						<p class="fragment fade-in-then-out">Four</p> +					</div> +					<div class="r-stack"> +						<img src="https://placekitten.com/450/300" width="450" height="300" class="fragment"> +						<img src="https://placekitten.com/300/450" width="300" height="450" class="fragment"> +						<img src="https://placekitten.com/400/400" width="400" height="400" class="fragment"> +					</div> +				</section> + +				<section> +					<h2>Stack Example</h2> +					<p>fade-in-then-out fragments</p> +					<div class="r-stack"> +						<img src="https://placekitten.com/450/300" width="450" height="300" class="fragment fade-in-then-out"> +						<img src="https://placekitten.com/300/450" width="300" height="450" class="fragment fade-in-then-out"> +						<img src="https://placekitten.com/400/400" width="400" height="400" class="fragment fade-in-then-out"> +					</div> +				</section> + +				<section id="hstack"> +					<h2>HStack</h2> +					<p>Stacks multiple elements horizontally.</p> +					<pre><code class="html" data-trim data-line-numbers> +					  <div class="r-hstack"> +					    <img width="450" height="300" src="..."> +					    <img width="300" height="450" src="..."> +					    <img width="400" height="400" src="..."> +					  </div> +					</code></pre> +				</section> + +				<section data-auto-animate> +					<h2>HStack Example</h2> +					<div class="r-hstack"> +						<p style="padding: 0.50em; background: #eee; margin: 0.25em">One</p> +						<p style="padding: 0.75em; background: #eee; margin: 0.25em">Two</p> +						<p style="padding: 1.00em; background: #eee; margin: 0.25em">Three</p> +					</div> +				</section> + +				<section id="vstack"> +					<h2>VStack</h2> +					<p>Stacks multiple elements vertically.</p> +					<pre><code class="html" data-trim data-line-numbers> +					  <div class="r-vstack"> +					    <img width="450" height="300" src="..."> +					    <img width="300" height="450" src="..."> +					    <img width="400" height="400" src="..."> +					  </div> +					</code></pre> +				</section> + +				<section data-auto-animate> +					<h2>VStack Example</h2> +					<div class="r-vstack"> +						<p style="padding: 0.50em; background: #eee; margin: 0.25em">One</p> +						<p style="padding: 0.75em; background: #eee; margin: 0.25em">Two</p> +						<p style="padding: 1.00em; background: #eee; margin: 0.25em">Three</p> +					</div> +				</section> + +			</div> + +		</div> + +		<script src="../dist/reveal.js"></script> +		<script src="../plugin/highlight/highlight.js"></script> +		<script> +			Reveal.initialize({ +				center: true, +				hash: true, +				plugins: [ RevealHighlight ] +			}); +		</script> + +	</body> +</html> diff --git a/present/examples/markdown.html b/present/examples/markdown.html new file mode 100644 index 0000000..4d69f05 --- /dev/null +++ b/present/examples/markdown.html @@ -0,0 +1,161 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Markdown Example</title> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/white.css" id="theme"> + +        <link rel="stylesheet" href="../plugin/highlight/monokai.css"> +	</head> + +	<body> + +		<div class="reveal"> + +			<div class="slides"> + +                <!-- Use external markdown resource, separate slides by three newlines; vertical slides by two newlines --> +                <section data-markdown="markdown.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section> + +                <!-- Slides are separated by three dashes (the default) --> +                <section data-markdown> +                    <script type="text/template"> +                        ## Demo 1 +                        Slide 1 +                        --- +                        ## Demo 1 +                        Slide 2 +                        --- +                        ## Demo 1 +                        Slide 3 +                    </script> +                </section> + +                <!-- Slides are separated by regexp matching newline + three dashes + newline, vertical slides identical but two dashes --> +                <section data-markdown data-separator="^\n---\n$" data-separator-vertical="^\n--\n$"> +                    <script type="text/template"> +                        ## Demo 2 +                        Slide 1.1 + +                        -- + +                        ## Demo 2 +                        Slide 1.2 + +                        --- + +                        ## Demo 2 +                        Slide 2 +                    </script> +                </section> + +                <!-- No "extra" slides, since the separator can't be matched ("---" will become horizontal rulers) --> +                <section data-markdown data-separator="$x"> +                    <script type="text/template"> +                        A + +                        --- + +                        B + +                        --- + +                        C +                    </script> +                </section> + +                <!-- Slide attributes --> +                <section data-markdown> +                    <script type="text/template"> +                        <!-- .slide: data-background="#000000" --> +                        ## Slide attributes +                    </script> +                </section> + +                <!-- Element attributes --> +                <section data-markdown> +                    <script type="text/template"> +                        ## Element attributes +                        - Item 1 <!-- .element: class="fragment" data-fragment-index="2" --> +                        - Item 2 <!-- .element: class="fragment" data-fragment-index="1" --> +                    </script> +                </section> + +                <!-- Code --> +                <section data-markdown> +                    <script type="text/template"> +                        ```php [1|3-5] +                        public function foo() +                        { +                            $foo = array( +                                'bar' => 'bar' +                            ) +                        } +                        ``` +                    </script> +                </section> + +                <!-- add optional line count offset, in this case 287 --> +                <section data-markdown> +                    <script type="text/template"> +                        ## echo.c + +                        ```c [287: 2|4,6] +                        /* All of the options in this arg are valid, so handle them. */ +                        p = arg + 1; +                        do { +                            if (*p == 'n') +                                nflag = 0; +                            if (*p == 'e') +                                eflag = '\\'; +                        } while (*++p);  +                        ``` +                        [source](https://git.busybox.net/busybox/tree/coreutils/echo.c?h=1_36_stable#n287) +                    </script> +                </section> + +                <!-- Images --> +                <section data-markdown> +                    <script type="text/template"> +                         +                    </script> +                </section> + +                <!-- Math --> +                <section data-markdown> +					## The Lorenz Equations +					`\[\begin{aligned} +					\dot{x} & = \sigma(y-x) \\ +					\dot{y} & = \rho x - y - xz \\ +					\dot{z} & = -\beta z + xy +					\end{aligned} \]` +                </section> + +            </div> +		</div> + +		<script src="../dist/reveal.js"></script> +        <script src="../plugin/markdown/markdown.js"></script> +        <script src="../plugin/highlight/highlight.js"></script> +        <script src="../plugin/notes/notes.js"></script> +        <script src="../plugin/math/math.js"></script> + +		<script> + +			Reveal.initialize({ +				controls: true, +				progress: true, +				history: true, +				center: true, + +				plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, RevealMath.KaTeX ] +			}); + +		</script> + +	</body> +</html> diff --git a/present/examples/markdown.md b/present/examples/markdown.md new file mode 100644 index 0000000..1315172 --- /dev/null +++ b/present/examples/markdown.md @@ -0,0 +1,41 @@ +# Markdown Demo + + + +## External 1.1 + +Content 1.1 + +Note: This will only appear in the speaker notes window. + + +## External 1.2 + +Content 1.2 + + + +## External 2 + +Content 2.1 + + + +## External 3.1 + +Content 3.1 + + +## External 3.2 + +Content 3.2 + + +## External 3.3 (Image) + + + + +## External 3.4 (Math) + +`\[ J(\theta_0,\theta_1) = \sum_{i=0} \]` diff --git a/present/examples/math.html b/present/examples/math.html new file mode 100644 index 0000000..bd2e75a --- /dev/null +++ b/present/examples/math.html @@ -0,0 +1,206 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Math Plugin</title> + +		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/night.css" id="theme"> +	</head> + +	<body> + +		<div class="reveal"> + +			<div class="slides"> + +				<section> +					<h2>reveal.js Math Plugin</h2> +					<p>Render math with KaTeX, MathJax 2 or MathJax 3</p> +				</section> + +				<section> +					<h3>The Lorenz Equations</h3> + +					\[\begin{aligned} +					\dot{x} & = \sigma(y-x) \\ +					\dot{y} & = \rho x - y - xz \\ +					\dot{z} & = -\beta z + xy +					\end{aligned} \] +				</section> + +				<section> +					<h3>The Cauchy-Schwarz Inequality</h3> + +					<script type="math/tex; mode=display"> +						\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) +					</script> +				</section> + +				<section> +					<h3>A Cross Product Formula</h3> + +					\[\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix} +					\mathbf{i} & \mathbf{j} & \mathbf{k} \\ +					\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\ +					\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0 +					\end{vmatrix}  \] +				</section> + +				<section> +					<h3>The probability of getting \(k\) heads when flipping \(n\) coins is</h3> + +					\[P(E)   = {n \choose k} p^k (1-p)^{ n-k} \] +				</section> + +				<section> +					<h3>An Identity of Ramanujan</h3> + +					\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = +					1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} +					{1+\frac{e^{-8\pi}} {1+\ldots} } } } \] +				</section> + +				<section> +					<h3>A Rogers-Ramanujan Identity</h3> + +					\[  1 +  \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = +					\prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}\] +				</section> + +				<section> +					<h3>Maxwell’s Equations</h3> + +					\[  \begin{aligned} +					\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\   \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ +					\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ +					\nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} +					\] +				</section> + +				<section> +					<h3>TeX Macros</h3> + +					Here is a common vector space: +					\[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\] +					used in functional analysis. +				</section> + +				<section> +					<section> +						<h3>The Lorenz Equations</h3> + +						<div class="fragment"> +							\[\begin{aligned} +							\dot{x} & = \sigma(y-x) \\ +							\dot{y} & = \rho x - y - xz \\ +							\dot{z} & = -\beta z + xy +							\end{aligned} \] +						</div> +					</section> + +					<section> +						<h3>The Cauchy-Schwarz Inequality</h3> + +						<div class="fragment"> +							\[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \] +						</div> +					</section> + +					<section> +						<h3>A Cross Product Formula</h3> + +						<div class="fragment"> +							\[\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix} +							\mathbf{i} & \mathbf{j} & \mathbf{k} \\ +							\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\ +							\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0 +							\end{vmatrix}  \] +						</div> +					</section> + +					<section> +						<h3>The probability of getting \(k\) heads when flipping \(n\) coins is</h3> + +						<div class="fragment"> +							\[P(E)   = {n \choose k} p^k (1-p)^{ n-k} \] +						</div> +					</section> + +					<section> +						<h3>An Identity of Ramanujan</h3> + +						<div class="fragment"> +							\[ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = +							1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} +							{1+\frac{e^{-8\pi}} {1+\ldots} } } } \] +						</div> +					</section> + +					<section> +						<h3>A Rogers-Ramanujan Identity</h3> + +						<div class="fragment"> +							\[  1 +  \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = +							\prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}\] +						</div> +					</section> + +					<section> +						<h3>Maxwell’s Equations</h3> + +						<div class="fragment"> +							\[  \begin{aligned} +							\nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\   \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\ +							\nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\ +							\nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} +							\] +						</div> +					</section> + +					<section> +						<h3>TeX Macros</h3> + +						Here is a common vector space: +						\[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\] +						used in functional analysis. +					</section> +				</section> + +			</div> + +		</div> + +		<script src="../dist/reveal.js"></script> +		<script src="../plugin/math/math.js"></script> +		<script> +			Reveal.initialize({ +				history: true, +				transition: 'linear', + +				mathjax2: { +					config: 'TeX-AMS_HTML-full', +					TeX: { +						Macros: { +							R: '\\mathbb{R}', +							set: [ '\\left\\{#1 \\; ; \\; #2\\right\\}', 2 ] +						} +					} +				}, + +				// There are three typesetters available +				// RevealMath.MathJax2 (default) +				// RevealMath.MathJax3 +				// RevealMath.KaTeX +				// +				// More info at https://revealjs.com/math/ +				plugins: [ RevealMath.MathJax2 ] +			}); +		</script> + +	</body> +</html> diff --git a/present/examples/media.html b/present/examples/media.html new file mode 100644 index 0000000..388208f --- /dev/null +++ b/present/examples/media.html @@ -0,0 +1,75 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Video, Audio and Iframes</title> + +		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/white.css" id="theme"> +	</head> + +	<body> + +		<div class="reveal"> + +			<div class="slides"> + +				<section> +					<h2>Examples of embedded Video, Audio and Iframes</h2> +				</section> + +				<section> +					<h2>Iframe</h2> +					<iframe data-autoplay width="700" height="540" src="https://slides.com/news/auto-animate/embed" frameborder="0"></iframe> +				</section> + +				<section data-background-iframe="https://www.youtube.com/embed/h1_nyI3z8gI" data-background-interactive> +					<h2 style="color: #fff;">Iframe Background</h2> +				</section> + +				<section> +					<h2>Video</h2> +					<video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" data-autoplay></video> +				</section> + +				<section data-background-video="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"> +					<h2>Background Video</h2> +				</section> + +				<section> +					<h2>Auto-playing audio</h2> +					<audio src="assets/beeping.wav" data-autoplay></audio> +				</section> + +				<section> +					<h2>Audio inside slide fragments</h2> +					<div class="fragment"> +						Beep 1 +						<audio src="assets/beeping.wav" data-autoplay></audio> +					</div> +					<div class="fragment"> +						Beep 2 +						<audio src="assets/beeping.wav" data-autoplay></audio> +					</div> +				</section> + +				<section> +					<h2>Audio with controls</h2> +					<audio src="assets/beeping.wav" controls></audio> +				</section> + +			</div> + +		</div> + +		<script src="../dist/reveal.js"></script> +		<script> +			Reveal.initialize({hash: true}); +		</script> + +	</body> +</html> diff --git a/present/examples/multiple-presentations.html b/present/examples/multiple-presentations.html new file mode 100644 index 0000000..e5347d4 --- /dev/null +++ b/present/examples/multiple-presentations.html @@ -0,0 +1,102 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Multiple Presentations</title> + +		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/white.css" id="theme"> +		<link rel="stylesheet" href="../plugin/highlight/monokai.css"> +	</head> + +	<body style="background: #ddd;"> + +		<div style="display: flex; flex-direction: row;"> +			<div class="reveal deck1" style="width: 100%; height: 50vh; margin: 10px;"> +				<div class="slides"> +					<section>Deck 1, Slide 1</section> +					<section>Deck 1, Slide 2</section> +					<section> +						<pre data-id="code-animation"><code class="hljs" data-trim data-line-numbers> +							import React, { useState } from 'react'; +							function Example() { +							  const [count, setCount] = useState(0); +							} +						</code></pre> +					</section> +				</div> +			</div> + +			<div class="reveal deck2" style="width: 100%; height: 50vh; margin: 10px;"> +				<div class="slides"> +					<section>Deck 2, Slide 1</section> +					<section>Deck 2, Slide 2</section> +					<section data-markdown> +						<script type="text/template"> +							## Markdown plugin + +							- 1 +							- 2 +							- 3 +						</script> +					</section> +					<section> +						<h3>The Lorenz Equations</h3> + +						\[\begin{aligned} +						\dot{x} & = \sigma(y-x) \\ +						\dot{y} & = \rho x - y - xz \\ +						\dot{z} & = -\beta z + xy +						\end{aligned} \] +					</section> +				</div> +			</div> +		</div> + +		<style> +			.reveal { +				border: 4px solid #ccc; +			} +			.reveal.focused { +				border-color: #94b5ff; +			} +		</style> + +		<script src="../dist/reveal.js"></script> +		<script src="../plugin/highlight/highlight.js"></script> +		<script src="../plugin/markdown/markdown.js"></script> +		<script src="../plugin/math/math.js"></script> +		<script> + +			let deck1 = new Reveal( document.querySelector( '.deck1' ), { +				embedded: true, +				progress: false, +				keyboardCondition: 'focused', +				plugins: [ RevealHighlight ] +			} ); +			deck1.on( 'slidechanged', () => { +				console.log( 'Deck 1 slide changed' ); +			} ); +			deck1.initialize(); + +			let deck2 = new Reveal( document.querySelector( '.deck2' ), { +				embedded: true, +				progress: false, +				keyboardCondition: 'focused', +				plugins: [ RevealMarkdown, RevealMath ] +			} ); +			deck2.initialize().then( () => { +				deck2.slide(1); +			} ); +			deck2.on( 'slidechanged', () => { +				console.log( 'Deck 2 slide changed' ); +			} ); + +		</script> + +	</body> +</html> diff --git a/present/examples/transitions.html b/present/examples/transitions.html new file mode 100644 index 0000000..adbfd15 --- /dev/null +++ b/present/examples/transitions.html @@ -0,0 +1,97 @@ +<!doctype html> +<html lang="en"> + +	<head> +		<meta charset="utf-8"> + +		<title>reveal.js - Slide Transitions</title> + +		<link rel="stylesheet" href="../dist/reveal.css"> +		<link rel="stylesheet" href="../dist/theme/white.css" id="theme"> +		<style type="text/css" media="screen"> +			.slides section.has-dark-background, +			.slides section.has-dark-background h3 { +				color: #fff; +			} +			.slides section.has-light-background, +			.slides section.has-light-background h3 { +				color: #222; +			} +		</style> +	</head> + +	<body> + +		<div class="reveal"> + +			<div class="slides"> + +				<section> +					<h3>Default</h3> +				</section> + +				<section> +					<h3>Default</h3> +				</section> + +				<section data-transition="zoom"> +					<h3>data-transition: zoom</h3> +				</section> + +				<section data-transition="zoom-in fade-out"> +					<h3>data-transition: zoom-in fade-out</h3> +				</section> + +				<section> +					<h3>Default</h3> +				</section> + +				<section data-transition="convex"> +					<h3>data-transition: convex</h3> +				</section> + +				<section data-transition="convex-in concave-out"> +					<h3>data-transition: convex-in concave-out</h3> +				</section> + +				<section> +					<section data-transition="zoom"> +						<h3>Default</h3> +					</section> +					<section data-transition="concave"> +						<h3>data-transition: concave</h3> +					</section> +					<section data-transition="convex-in fade-out"> +						<h3>data-transition: convex-in fade-out</h3> +					</section> +					<section> +						<h3>Default</h3> +					</section> +				</section> + +				<section data-transition="none"> +					<h3>data-transition: none</h3> +				</section> + +				<section> +					<h3>Default</h3> +				</section> + +			</div> + +		</div> + +		<script src="../dist/reveal.js"></script> +		<script> +			Reveal.initialize({ +				center: true, +				history: true, + +				// transition: 'slide', +				// transitionSpeed: 'slow', +				// backgroundTransition: 'slide' +			}); +		</script> + +	</body> +</html> | 
