delete unnecessary, rework license
This commit is contained in:
parent
4da420637f
commit
2b0971ad7e
6
LICENSE
6
LICENSE
|
@ -1,3 +1,4 @@
|
||||||
|
## Software license
|
||||||
Copyright (C) 2019 Hakim El Hattab, http://hakim.se, and reveal.js contributors
|
Copyright (C) 2019 Hakim El Hattab, http://hakim.se, and reveal.js contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
@ -17,3 +18,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
## Presentation license
|
||||||
|
<xaloc@tutanota.com> wrote this code. As long as you retain this notice you can
|
||||||
|
do whatever you want with this stuff. If we meet some day, and you think this
|
||||||
|
stuff is worth it, you can buy me a non-alcoholic beverage in return Xaloc
|
||||||
|
|
BIN
Self-hosting-xaloc-nrp.pdf
Normal file
BIN
Self-hosting-xaloc-nrp.pdf
Normal file
Binary file not shown.
425
demo.html
425
demo.html
|
@ -1,425 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js – The HTML Presentation Framework</title>
|
|
||||||
|
|
||||||
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
|
|
||||||
<meta name="author" content="Hakim El Hattab">
|
|
||||||
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/reset.css">
|
|
||||||
<link rel="stylesheet" href="css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="css/theme/black.css" id="theme">
|
|
||||||
|
|
||||||
<!-- Theme used for syntax highlighting of code -->
|
|
||||||
<link rel="stylesheet" href="lib/css/monokai.css">
|
|
||||||
|
|
||||||
<!-- Printing and PDF exports -->
|
|
||||||
<script>
|
|
||||||
var link = document.createElement( 'link' );
|
|
||||||
link.rel = 'stylesheet';
|
|
||||||
link.type = 'text/css';
|
|
||||||
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
|
|
||||||
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="lib/js/html5shiv.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="reveal">
|
|
||||||
|
|
||||||
<!-- Any section element inside of this container is displayed as a slide -->
|
|
||||||
<div class="slides">
|
|
||||||
<section>
|
|
||||||
<h1>Reveal.js</h1>
|
|
||||||
<h3>The HTML Presentation Framework</h3>
|
|
||||||
<p>
|
|
||||||
<small>Created by <a href="http://hakim.se">Hakim El Hattab</a> and <a href="https://github.com/hakimel/reveal.js/graphs/contributors">contributors</a></small>
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Hello There</h2>
|
|
||||||
<p>
|
|
||||||
reveal.js enables you to create beautiful interactive slide decks using HTML. This presentation will show you examples of what it can do.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Example of nested vertical slides -->
|
|
||||||
<section>
|
|
||||||
<section>
|
|
||||||
<h2>Vertical Slides</h2>
|
|
||||||
<p>Slides can be nested inside of each other.</p>
|
|
||||||
<p>Use the <em>Space</em> key to navigate through all slides.</p>
|
|
||||||
<br>
|
|
||||||
<a href="#" class="navigate-down">
|
|
||||||
<img width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Down arrow">
|
|
||||||
</a>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Basement Level 1</h2>
|
|
||||||
<p>Nested slides are useful for adding additional detail underneath a high level horizontal slide.</p>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Basement Level 2</h2>
|
|
||||||
<p>That's it, time to go back up.</p>
|
|
||||||
<br>
|
|
||||||
<a href="#/2">
|
|
||||||
<img width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Up arrow" style="transform: rotate(180deg); -webkit-transform: rotate(180deg);">
|
|
||||||
</a>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Slides</h2>
|
|
||||||
<p>
|
|
||||||
Not a coder? Not a problem. There's a fully-featured visual editor for authoring these, try it out at <a href="https://slides.com" target="_blank">https://slides.com</a>.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Point of View</h2>
|
|
||||||
<p>
|
|
||||||
Press <strong>ESC</strong> to enter the slide overview.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Hold down the <strong>alt</strong> key (<strong>ctrl</strong> in Linux) and click on any element to zoom towards it using <a href="http://lab.hakim.se/zoom-js">zoom.js</a>. Click again to zoom back out.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
(NOTE: Use ctrl + click in Linux.)
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Touch Optimized</h2>
|
|
||||||
<p>
|
|
||||||
Presentations look great on touch devices, like mobile phones and tablets. Simply swipe through your slides.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
## Markdown support
|
|
||||||
|
|
||||||
Write content using inline or external Markdown.
|
|
||||||
Instructions and more info available in the [readme](https://github.com/hakimel/reveal.js#markdown).
|
|
||||||
|
|
||||||
```
|
|
||||||
<section data-markdown>
|
|
||||||
## Markdown support
|
|
||||||
|
|
||||||
Write content using inline or external Markdown.
|
|
||||||
Instructions and more info available in the [readme](https://github.com/hakimel/reveal.js#markdown).
|
|
||||||
</section>
|
|
||||||
```
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<section id="fragments">
|
|
||||||
<h2>Fragments</h2>
|
|
||||||
<p>Hit the next arrow...</p>
|
|
||||||
<p class="fragment">... to step through ...</p>
|
|
||||||
<p><span class="fragment">... a</span> <span class="fragment">fragmented</span> <span class="fragment">slide.</span></p>
|
|
||||||
|
|
||||||
<aside class="notes">
|
|
||||||
This slide has fragments which are also stepped through in the notes window.
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h2>Fragment Styles</h2>
|
|
||||||
<p>There's different types of fragments, like:</p>
|
|
||||||
<p class="fragment grow">grow</p>
|
|
||||||
<p class="fragment shrink">shrink</p>
|
|
||||||
<p class="fragment fade-out">fade-out</p>
|
|
||||||
<p>
|
|
||||||
<span style="display: inline-block;" class="fragment fade-right">fade-right, </span>
|
|
||||||
<span style="display: inline-block;" class="fragment fade-up">up, </span>
|
|
||||||
<span style="display: inline-block;" class="fragment fade-down">down, </span>
|
|
||||||
<span style="display: inline-block;" class="fragment fade-left">left</span>
|
|
||||||
</p>
|
|
||||||
<p class="fragment fade-in-then-out">fade-in-then-out</p>
|
|
||||||
<p class="fragment fade-in-then-semi-out">fade-in-then-semi-out</p>
|
|
||||||
<p>Highlight <span class="fragment highlight-red">red</span> <span class="fragment highlight-blue">blue</span> <span class="fragment highlight-green">green</span></p>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="transitions">
|
|
||||||
<h2>Transition Styles</h2>
|
|
||||||
<p>
|
|
||||||
You can select from different transitions, like: <br>
|
|
||||||
<a href="?transition=none#/transitions">None</a> -
|
|
||||||
<a href="?transition=fade#/transitions">Fade</a> -
|
|
||||||
<a href="?transition=slide#/transitions">Slide</a> -
|
|
||||||
<a href="?transition=convex#/transitions">Convex</a> -
|
|
||||||
<a href="?transition=concave#/transitions">Concave</a> -
|
|
||||||
<a href="?transition=zoom#/transitions">Zoom</a>
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="themes">
|
|
||||||
<h2>Themes</h2>
|
|
||||||
<p>
|
|
||||||
reveal.js comes with a few themes built in: <br>
|
|
||||||
<!-- Hacks to swap themes after the page has loaded. Not flexible and only intended for the reveal.js demo deck. -->
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/black.css'); return false;">Black (default)</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/white.css'); return false;">White</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/league.css'); return false;">League</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/sky.css'); return false;">Sky</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/beige.css'); return false;">Beige</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/simple.css'); return false;">Simple</a> <br>
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/serif.css'); return false;">Serif</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/blood.css'); return false;">Blood</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/night.css'); return false;">Night</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/moon.css'); return false;">Moon</a> -
|
|
||||||
<a href="#" onclick="document.getElementById('theme').setAttribute('href','css/theme/solarized.css'); return false;">Solarized</a>
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<section data-background="#dddddd">
|
|
||||||
<h2>Slide Backgrounds</h2>
|
|
||||||
<p>
|
|
||||||
Set <code>data-background="#dddddd"</code> on a slide to change the background color. All CSS color formats are supported.
|
|
||||||
</p>
|
|
||||||
<a href="#" class="navigate-down">
|
|
||||||
<img width="178" height="238" data-src="https://s3.amazonaws.com/hakim-static/reveal-js/arrow.png" alt="Down arrow">
|
|
||||||
</a>
|
|
||||||
</section>
|
|
||||||
<section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png">
|
|
||||||
<h2>Image Backgrounds</h2>
|
|
||||||
<pre><code class="hljs html"><section data-background="image.png"></code></pre>
|
|
||||||
</section>
|
|
||||||
<section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png" data-background-repeat="repeat" data-background-size="100px">
|
|
||||||
<h2>Tiled Backgrounds</h2>
|
|
||||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"></code></pre>
|
|
||||||
</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" data-background-color="#000000">
|
|
||||||
<div style="background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;">
|
|
||||||
<h2>Video Backgrounds</h2>
|
|
||||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background-video="video.mp4,video.webm"></code></pre>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
<section data-background="http://i.giphy.com/90F8aUepslB84.gif">
|
|
||||||
<h2>... and GIFs!</h2>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
|
|
||||||
<h2>Background Transitions</h2>
|
|
||||||
<p>
|
|
||||||
Different background transitions are available via the backgroundTransition option. This one's called "zoom".
|
|
||||||
</p>
|
|
||||||
<pre><code class="hljs javascript">Reveal.configure({ backgroundTransition: 'zoom' })</code></pre>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-transition="slide" data-background="#b5533c" data-background-transition="zoom">
|
|
||||||
<h2>Background Transitions</h2>
|
|
||||||
<p>
|
|
||||||
You can override background transitions per-slide.
|
|
||||||
</p>
|
|
||||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background-transition="zoom"></code></pre>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-background-iframe="https://hakim.se" data-background-interactive>
|
|
||||||
<div style="position: absolute; width: 40%; right: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.5), 0 5px 25px rgba(0,0,0,0.2); background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px; font-size: 20px; text-align: left;">
|
|
||||||
<h2>Iframe Backgrounds</h2>
|
|
||||||
<p>Since reveal.js runs on the web, you can easily embed other web content. Try interacting with the page in the background.</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Pretty Code</h2>
|
|
||||||
<pre><code class="hljs" data-trim data-line-numbers="4|9|4,8-11">
|
|
||||||
import React, { useState } from 'react';
|
|
||||||
|
|
||||||
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>
|
|
||||||
<p>Code syntax highlighting courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Marvelous List</h2>
|
|
||||||
<ul>
|
|
||||||
<li>No order here</li>
|
|
||||||
<li>Or here</li>
|
|
||||||
<li>Or here</li>
|
|
||||||
<li>Or here</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Fantastic Ordered List</h2>
|
|
||||||
<ol>
|
|
||||||
<li>One is smaller than...</li>
|
|
||||||
<li>Two is smaller than...</li>
|
|
||||||
<li>Three!</li>
|
|
||||||
</ol>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Tabular Tables</h2>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Item</th>
|
|
||||||
<th>Value</th>
|
|
||||||
<th>Quantity</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>Apples</td>
|
|
||||||
<td>$1</td>
|
|
||||||
<td>7</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Lemonade</td>
|
|
||||||
<td>$2</td>
|
|
||||||
<td>18</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>Bread</td>
|
|
||||||
<td>$3</td>
|
|
||||||
<td>2</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Clever Quotes</h2>
|
|
||||||
<p>
|
|
||||||
These guys come in two forms, inline: <q cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-Technology-Quotations">The nice thing about standards is that there are so many to choose from</q> and block:
|
|
||||||
</p>
|
|
||||||
<blockquote cite="http://searchservervirtualization.techtarget.com/definition/Our-Favorite-Technology-Quotations">
|
|
||||||
“For years there has been a theory that millions of monkeys typing at random on millions of typewriters would
|
|
||||||
reproduce the entire works of Shakespeare. The Internet has proven this theory to be untrue.”
|
|
||||||
</blockquote>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Intergalactic Interconnections</h2>
|
|
||||||
<p>
|
|
||||||
You can link between slides internally,
|
|
||||||
<a href="#/2/3">like this</a>.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Speaker View</h2>
|
|
||||||
<p>There's a <a href="https://github.com/hakimel/reveal.js#speaker-notes">speaker view</a>. It includes a timer, preview of the upcoming slide as well as your speaker notes.</p>
|
|
||||||
<p>Press the <em>S</em> key to try it out.</p>
|
|
||||||
|
|
||||||
<aside class="notes">
|
|
||||||
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
|
|
||||||
</aside>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Export to PDF</h2>
|
|
||||||
<p>Presentations can be <a href="https://github.com/hakimel/reveal.js#pdf-export">exported to PDF</a>, here's an example:</p>
|
|
||||||
<iframe data-src="https://www.slideshare.net/slideshow/embed_code/42840540" width="445" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:3px solid #666; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Global State</h2>
|
|
||||||
<p>
|
|
||||||
Set <code>data-state="something"</code> on a slide and <code>"something"</code>
|
|
||||||
will be added as a class to the document element when the slide is open. This lets you
|
|
||||||
apply broader style changes, like switching the page background.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-state="customevent">
|
|
||||||
<h2>State Events</h2>
|
|
||||||
<p>
|
|
||||||
Additionally custom events can be triggered on a per slide basis by binding to the <code>data-state</code> name.
|
|
||||||
</p>
|
|
||||||
<pre><code class="javascript" data-trim contenteditable style="font-size: 18px;">
|
|
||||||
Reveal.addEventListener( 'customevent', function() {
|
|
||||||
console.log( '"customevent" has fired' );
|
|
||||||
} );
|
|
||||||
</code></pre>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Take a Moment</h2>
|
|
||||||
<p>
|
|
||||||
Press B or . on your keyboard to pause the presentation. This is helpful when you're on stage and want to take distracting slides off the screen.
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Much more</h2>
|
|
||||||
<ul>
|
|
||||||
<li>Right-to-left support</li>
|
|
||||||
<li><a href="https://github.com/hakimel/reveal.js#api">Extensive JavaScript API</a></li>
|
|
||||||
<li><a href="https://github.com/hakimel/reveal.js#auto-sliding">Auto-progression</a></li>
|
|
||||||
<li><a href="https://github.com/hakimel/reveal.js#parallax-background">Parallax backgrounds</a></li>
|
|
||||||
<li><a href="https://github.com/hakimel/reveal.js#keyboard-bindings">Custom keyboard bindings</a></li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section style="text-align: left;">
|
|
||||||
<h1>THE END</h1>
|
|
||||||
<p>
|
|
||||||
- <a href="https://slides.com">Try the online editor</a> <br>
|
|
||||||
- <a href="https://github.com/hakimel/reveal.js">Source code & documentation</a>
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="js/reveal.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
// More info https://github.com/hakimel/reveal.js#configuration
|
|
||||||
Reveal.initialize({
|
|
||||||
controls: true,
|
|
||||||
progress: true,
|
|
||||||
center: true,
|
|
||||||
hash: true,
|
|
||||||
|
|
||||||
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
|
||||||
|
|
||||||
// More info https://github.com/hakimel/reveal.js#dependencies
|
|
||||||
dependencies: [
|
|
||||||
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
|
||||||
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
|
||||||
{ src: 'plugin/highlight/highlight.js' },
|
|
||||||
{ src: 'plugin/search/search.js', async: true },
|
|
||||||
{ src: 'plugin/zoom-js/zoom.js', async: true },
|
|
||||||
{ src: 'plugin/notes/notes.js', async: true }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -197,10 +197,13 @@
|
||||||
<span class="fragment"><li>Tiempo, en especial cuando se rompe algo</li></span>
|
<span class="fragment"><li>Tiempo, en especial cuando se rompe algo</li></span>
|
||||||
<span class="fragment"><li>Problemas externos en tu casa, apagones, cortes internet, ...</li></span>
|
<span class="fragment"><li>Problemas externos en tu casa, apagones, cortes internet, ...</li></span>
|
||||||
</ul>
|
</ul>
|
||||||
|
<aside class="notes">
|
||||||
|
Instal·lació pot necessitar terminal i alguna config pot necessitar tame
|
||||||
|
</aside>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h2>Mi futuro perfecto</h2>
|
<h2>Como veo el futuro</h2>
|
||||||
<aside class="notes">
|
<aside class="notes">
|
||||||
un petit server amb router per serveis bàsics cloud, xmpp, ...
|
un petit server amb router per serveis bàsics cloud, xmpp, ...
|
||||||
</aside>
|
</aside>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
window.externalScriptSequence += 'A';
|
|
|
@ -1 +0,0 @@
|
||||||
window.externalScriptSequence += 'B';
|
|
|
@ -1 +0,0 @@
|
||||||
window.externalScriptSequence += 'C';
|
|
|
@ -1 +0,0 @@
|
||||||
window.externalScriptSequence += 'D';
|
|
|
@ -1,2 +0,0 @@
|
||||||
Source: https://freesound.org/people/fennelliott/sounds/379419/
|
|
||||||
License: CC0 (public domain)
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 22 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
|
@ -1,41 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Barebones</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../../css/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="../../js/reveal.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,53 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Embedded Media</title>
|
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../../css/theme/default.css" id="theme">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="reveal">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Embedded Media Test</h2>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<iframe data-autoplay width="420" height="345" src="http://www.youtube.com/embed/l3RQZ4mcr1c"></iframe>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Empty Slide</h2>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>Auto-playing audio</h2>
|
|
||||||
<audio src="assets/beeping.wav" data-autoplay></audio>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../../js/reveal.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
transition: 'linear'
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,205 +0,0 @@
|
||||||
<!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="../../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../../css/theme/night.css" id="theme">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="reveal">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h2>reveal.js Math Plugin</h2>
|
|
||||||
<p>A thin wrapper for MathJax</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="../../js/reveal.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
history: true,
|
|
||||||
transition: 'linear',
|
|
||||||
|
|
||||||
math: {
|
|
||||||
// mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
|
|
||||||
config: 'TeX-AMS_HTML-full',
|
|
||||||
TeX: {
|
|
||||||
Macros: {
|
|
||||||
R: '\\mathbb{R}',
|
|
||||||
set: [ '\\left\\{#1 \\; ; \\; #2\\right\\}', 2 ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
dependencies: [
|
|
||||||
{ src: '../../plugin/math/math.js', async: true }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,143 +0,0 @@
|
||||||
<!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="../../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../../css/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="../../js/reveal.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
// Full list of configuration options available here:
|
|
||||||
// https://github.com/hakimel/reveal.js#configuration
|
|
||||||
Reveal.initialize({
|
|
||||||
center: true,
|
|
||||||
// rtl: true,
|
|
||||||
|
|
||||||
transition: 'linear',
|
|
||||||
// transitionSpeed: 'slow',
|
|
||||||
// backgroundTransition: 'slide'
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,100 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Slide Transitions</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../../css/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="../../js/reveal.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
center: true,
|
|
||||||
history: true,
|
|
||||||
|
|
||||||
// transition: 'slide',
|
|
||||||
// transitionSpeed: 'slow',
|
|
||||||
// backgroundTransition: 'slide'
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,436 +0,0 @@
|
||||||
/*!
|
|
||||||
* QUnit 2.5.0
|
|
||||||
* https://qunitjs.com/
|
|
||||||
*
|
|
||||||
* Copyright jQuery Foundation and other contributors
|
|
||||||
* Released under the MIT license
|
|
||||||
* https://jquery.org/license
|
|
||||||
*
|
|
||||||
* Date: 2018-01-10T02:56Z
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** Font Family and Sizes */
|
|
||||||
|
|
||||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult {
|
|
||||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
|
||||||
#qunit-tests { font-size: smaller; }
|
|
||||||
|
|
||||||
|
|
||||||
/** Resets */
|
|
||||||
|
|
||||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** Header (excluding toolbar) */
|
|
||||||
|
|
||||||
#qunit-header {
|
|
||||||
padding: 0.5em 0 0.5em 1em;
|
|
||||||
|
|
||||||
color: #8699A4;
|
|
||||||
background-color: #0D3349;
|
|
||||||
|
|
||||||
font-size: 1.5em;
|
|
||||||
line-height: 1em;
|
|
||||||
font-weight: 400;
|
|
||||||
|
|
||||||
border-radius: 5px 5px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-header a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #C2CCD1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-header a:hover,
|
|
||||||
#qunit-header a:focus {
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-banner {
|
|
||||||
height: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-filteredTest {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
color: #366097;
|
|
||||||
background-color: #F4FF77;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-userAgent {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
color: #FFF;
|
|
||||||
background-color: #2B81AF;
|
|
||||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** Toolbar */
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
color: #5E740B;
|
|
||||||
background-color: #EEE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar .clearfix {
|
|
||||||
height: 0;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar label {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar input[type=checkbox],
|
|
||||||
#qunit-testrunner-toolbar input[type=radio] {
|
|
||||||
margin: 3px;
|
|
||||||
vertical-align: -2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar input[type=text] {
|
|
||||||
box-sizing: border-box;
|
|
||||||
height: 1.6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-url-config,
|
|
||||||
.qunit-filter,
|
|
||||||
#qunit-modulefilter {
|
|
||||||
display: inline-block;
|
|
||||||
line-height: 2.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-filter,
|
|
||||||
#qunit-modulefilter {
|
|
||||||
float: right;
|
|
||||||
position: relative;
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-url-config label {
|
|
||||||
margin-right: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-search {
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-search-container:after {
|
|
||||||
position: absolute;
|
|
||||||
right: 0.3em;
|
|
||||||
content: "\25bc";
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown {
|
|
||||||
/* align with #qunit-modulefilter-search */
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 400px;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 50%;
|
|
||||||
margin-top: 0.8em;
|
|
||||||
|
|
||||||
border: 1px solid #D3D3D3;
|
|
||||||
border-top: none;
|
|
||||||
border-radius: 0 0 .25em .25em;
|
|
||||||
color: #000;
|
|
||||||
background-color: #F5F5F5;
|
|
||||||
z-index: 99;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown .clickable.checked {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #000;
|
|
||||||
background-color: #D2E0E6;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown .clickable:hover {
|
|
||||||
color: #FFF;
|
|
||||||
background-color: #0D3349;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-actions {
|
|
||||||
display: block;
|
|
||||||
overflow: auto;
|
|
||||||
|
|
||||||
/* align with #qunit-modulefilter-dropdown-list */
|
|
||||||
font: smaller/1.5em sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > * {
|
|
||||||
box-sizing: border-box;
|
|
||||||
max-height: 2.8em;
|
|
||||||
display: block;
|
|
||||||
padding: 0.4em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > button {
|
|
||||||
float: right;
|
|
||||||
font: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > :last-child {
|
|
||||||
/* insert padding to align with checkbox margins */
|
|
||||||
padding-left: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown-list {
|
|
||||||
max-height: 200px;
|
|
||||||
overflow-y: auto;
|
|
||||||
margin: 0;
|
|
||||||
border-top: 2px groove threedhighlight;
|
|
||||||
padding: 0.4em 0 0;
|
|
||||||
font: smaller/1.5em sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown-list li {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-dropdown-list .clickable {
|
|
||||||
display: block;
|
|
||||||
padding-left: 0.15em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** Tests: Pass/Fail */
|
|
||||||
|
|
||||||
#qunit-tests {
|
|
||||||
list-style-position: inside;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li {
|
|
||||||
padding: 0.4em 1em 0.4em 1em;
|
|
||||||
border-bottom: 1px solid #FFF;
|
|
||||||
list-style-position: inside;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests > li {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li.running,
|
|
||||||
#qunit-tests li.pass,
|
|
||||||
#qunit-tests li.fail,
|
|
||||||
#qunit-tests li.skipped,
|
|
||||||
#qunit-tests li.aborted {
|
|
||||||
display: list-item;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests.hidepass {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests.hidepass li.running,
|
|
||||||
#qunit-tests.hidepass li.pass:not(.todo) {
|
|
||||||
visibility: hidden;
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li strong {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li.skipped strong {
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li a {
|
|
||||||
padding: 0.5em;
|
|
||||||
color: #C2CCD1;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li p a {
|
|
||||||
padding: 0.25em;
|
|
||||||
color: #6B6464;
|
|
||||||
}
|
|
||||||
#qunit-tests li a:hover,
|
|
||||||
#qunit-tests li a:focus {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li .runtime {
|
|
||||||
float: right;
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-assert-list {
|
|
||||||
margin-top: 0.5em;
|
|
||||||
padding: 0.5em;
|
|
||||||
|
|
||||||
background-color: #FFF;
|
|
||||||
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-source {
|
|
||||||
margin: 0.6em 0 0.3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-collapsed {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
margin-top: 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests th {
|
|
||||||
text-align: right;
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 0 0.5em 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests td {
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests pre {
|
|
||||||
margin: 0;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests del {
|
|
||||||
color: #374E0C;
|
|
||||||
background-color: #E0F2BE;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests ins {
|
|
||||||
color: #500;
|
|
||||||
background-color: #FFCACA;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** Test Counts */
|
|
||||||
|
|
||||||
#qunit-tests b.counts { color: #000; }
|
|
||||||
#qunit-tests b.passed { color: #5E740B; }
|
|
||||||
#qunit-tests b.failed { color: #710909; }
|
|
||||||
|
|
||||||
#qunit-tests li li {
|
|
||||||
padding: 5px;
|
|
||||||
background-color: #FFF;
|
|
||||||
border-bottom: none;
|
|
||||||
list-style-position: inside;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** Passing Styles */
|
|
||||||
|
|
||||||
#qunit-tests li li.pass {
|
|
||||||
color: #3C510C;
|
|
||||||
background-color: #FFF;
|
|
||||||
border-left: 10px solid #C6E746;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
|
||||||
#qunit-tests .pass .test-name { color: #366097; }
|
|
||||||
|
|
||||||
#qunit-tests .pass .test-actual,
|
|
||||||
#qunit-tests .pass .test-expected { color: #999; }
|
|
||||||
|
|
||||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
|
||||||
|
|
||||||
/*** Failing Styles */
|
|
||||||
|
|
||||||
#qunit-tests li li.fail {
|
|
||||||
color: #710909;
|
|
||||||
background-color: #FFF;
|
|
||||||
border-left: 10px solid #EE5757;
|
|
||||||
white-space: pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests > li:last-child {
|
|
||||||
border-radius: 0 0 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
|
||||||
#qunit-tests .fail .test-name,
|
|
||||||
#qunit-tests .fail .module-name { color: #000; }
|
|
||||||
|
|
||||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
|
||||||
#qunit-tests .fail .test-expected { color: #008000; }
|
|
||||||
|
|
||||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
|
||||||
|
|
||||||
|
|
||||||
/*** Aborted tests */
|
|
||||||
#qunit-tests .aborted { color: #000; background-color: orange; }
|
|
||||||
/*** Skipped tests */
|
|
||||||
|
|
||||||
#qunit-tests .skipped {
|
|
||||||
background-color: #EBECE9;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests .qunit-todo-label,
|
|
||||||
#qunit-tests .qunit-skipped-label {
|
|
||||||
background-color: #F4FF77;
|
|
||||||
display: inline-block;
|
|
||||||
font-style: normal;
|
|
||||||
color: #366097;
|
|
||||||
line-height: 1.8em;
|
|
||||||
padding: 0 0.5em;
|
|
||||||
margin: -0.4em 0.4em -0.4em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests .qunit-todo-label {
|
|
||||||
background-color: #EEE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Result */
|
|
||||||
|
|
||||||
#qunit-testresult {
|
|
||||||
color: #2B81AF;
|
|
||||||
background-color: #D2E0E6;
|
|
||||||
|
|
||||||
border-bottom: 1px solid #FFF;
|
|
||||||
}
|
|
||||||
#qunit-testresult .clearfix {
|
|
||||||
height: 0;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
#qunit-testresult .module-name {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
#qunit-testresult-display {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
width: 85%;
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
#qunit-testresult-controls {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
width: 10%;
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Fixture */
|
|
||||||
|
|
||||||
#qunit-fixture {
|
|
||||||
position: absolute;
|
|
||||||
top: -10000px;
|
|
||||||
left: -10000px;
|
|
||||||
width: 1000px;
|
|
||||||
height: 1000px;
|
|
||||||
}
|
|
5188
test/qunit-2.5.0.js
5188
test/qunit-2.5.0.js
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +0,0 @@
|
||||||
## Slide 1.1
|
|
||||||
|
|
||||||
```js
|
|
||||||
var a = 1;
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 1.2
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2
|
|
|
@ -1,78 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Async Dependencies</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>Slide content</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var externalScriptSequence = '';
|
|
||||||
var scriptCount = 0;
|
|
||||||
|
|
||||||
QUnit.config.autostart = false;
|
|
||||||
QUnit.module( 'Async Dependencies' );
|
|
||||||
|
|
||||||
QUnit.test( 'Async scripts are loaded', function( assert ) {
|
|
||||||
assert.expect( 5 );
|
|
||||||
var done = assert.async( 5 );
|
|
||||||
|
|
||||||
function callback( event ) {
|
|
||||||
if( externalScriptSequence.length === 1 ) {
|
|
||||||
assert.ok( externalScriptSequence === 'A', 'first callback was sync script' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
assert.ok( true, 'async script loaded' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
if( externalScriptSequence.length === 4 ) {
|
|
||||||
assert.ok( externalScriptSequence.indexOf( 'A' ) !== -1 &&
|
|
||||||
externalScriptSequence.indexOf( 'B' ) !== -1 &&
|
|
||||||
externalScriptSequence.indexOf( 'C' ) !== -1 &&
|
|
||||||
externalScriptSequence.indexOf( 'D' ) !== -1, 'four unique scripts were loaded' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptCount ++;
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
dependencies: [
|
|
||||||
{ src: 'assets/external-script-a.js', async: false, callback: callback },
|
|
||||||
{ src: 'assets/external-script-b.js', async: true, callback: callback },
|
|
||||||
{ src: 'assets/external-script-c.js', async: true, callback: callback },
|
|
||||||
{ src: 'assets/external-script-d.js', async: true, callback: callback }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.start();
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,54 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Dependencies</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>Slide content</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
window.externalScriptSequence = '';
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'Dependencies' );
|
|
||||||
|
|
||||||
QUnit.test( 'Load synchronous scripts', function( assert ) {
|
|
||||||
assert.strictEqual( window.externalScriptSequence, 'ABC', 'Loaded and executed in order' );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
dependencies: [
|
|
||||||
{ src: 'assets/external-script-a.js' },
|
|
||||||
{ src: 'assets/external-script-b.js' },
|
|
||||||
{ src: 'assets/external-script-c.js' }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,74 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Grid</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>0</section>
|
|
||||||
<section>
|
|
||||||
<section>1.1</section>
|
|
||||||
<section>1.2</section>
|
|
||||||
<section>1.3</section>
|
|
||||||
<section>1.4</section>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<section>2.1</section>
|
|
||||||
<section>2.2</section>
|
|
||||||
<section>2.3</section>
|
|
||||||
<section>2.4</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'Grid Navigation' );
|
|
||||||
|
|
||||||
QUnit.test( 'Disabled', function( assert ) {
|
|
||||||
Reveal.right();
|
|
||||||
Reveal.down();
|
|
||||||
Reveal.down();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' );
|
|
||||||
Reveal.right();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: undefined }, 'Moves to top when going to adjacent stack' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Enabled', function( assert ) {
|
|
||||||
Reveal.configure({ navigationMode: 'grid' });
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
Reveal.right();
|
|
||||||
Reveal.down();
|
|
||||||
Reveal.down();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined }, 'Correct starting point' );
|
|
||||||
Reveal.right();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 2, f: undefined }, 'Remains at same vertical index when going to adjacent stack' );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,104 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Iframe Backgrounds</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section data-background-iframe="#1">1</section>
|
|
||||||
<section data-background-iframe="#2">2</section>
|
|
||||||
<section data-background-iframe="#3" data-preload>3</section>
|
|
||||||
<section data-background-iframe="#4">4</section>
|
|
||||||
<section data-background-iframe="#5">5</section>
|
|
||||||
<section data-background-iframe="#6">6</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
function getIframe( index ) {
|
|
||||||
return document.querySelectorAll( '.slide-background' )[index].querySelector( 'iframe' );
|
|
||||||
}
|
|
||||||
|
|
||||||
QUnit.module( 'Iframe' );
|
|
||||||
|
|
||||||
QUnit.test( 'Using default settings', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.slide(0);
|
|
||||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'not preloaded when within viewDistance' );
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
|
|
||||||
Reveal.slide(0);
|
|
||||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'unloaded when slide becomes invisible' );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Using data-preload', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
|
||||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
|
|
||||||
Reveal.slide(0);
|
|
||||||
assert.strictEqual( getIframe(3).hasAttribute( 'src' ), false, 'unloads outside of viewDistance' );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Using preloadIframes: true', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.configure({ preloadIframes: true });
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( getIframe(0).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
|
||||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
|
||||||
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Using preloadIframes: false', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.configure({ preloadIframes: false });
|
|
||||||
|
|
||||||
Reveal.slide(0);
|
|
||||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
|
||||||
assert.strictEqual( getIframe(2).hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( getIframe(1).hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
viewDistance: 3
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,108 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Iframes</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>1</section>
|
|
||||||
<section>2</section>
|
|
||||||
<section>
|
|
||||||
<iframe class="default-iframe" data-src="#"></iframe>
|
|
||||||
<iframe class="preload-iframe" data-src="#" data-preload></iframe>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
var defaultIframe = document.querySelector( '.default-iframe' ),
|
|
||||||
preloadIframe = document.querySelector( '.preload-iframe' );
|
|
||||||
|
|
||||||
QUnit.module( 'Iframe' );
|
|
||||||
|
|
||||||
QUnit.test( 'Using default settings', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'not preloaded when within viewDistance' );
|
|
||||||
|
|
||||||
Reveal.slide(2);
|
|
||||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'unloaded when slide becomes invisible' );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Using data-preload', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
|
||||||
|
|
||||||
Reveal.slide(2);
|
|
||||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becoems visible' );
|
|
||||||
|
|
||||||
Reveal.slide(0);
|
|
||||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), false, 'unloads outside of viewDistance' );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Using preloadIframes: true', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.configure({ preloadIframes: true });
|
|
||||||
|
|
||||||
Reveal.slide(1);
|
|
||||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
|
||||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'preloaded within viewDistance' );
|
|
||||||
|
|
||||||
Reveal.slide(2);
|
|
||||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Using preloadIframes: false', function( assert ) {
|
|
||||||
|
|
||||||
Reveal.configure({ preloadIframes: false });
|
|
||||||
|
|
||||||
Reveal.slide(0);
|
|
||||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
|
||||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), false, 'not preloaded within viewDistance' );
|
|
||||||
|
|
||||||
Reveal.slide(2);
|
|
||||||
assert.strictEqual( defaultIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
assert.strictEqual( preloadIframe.hasAttribute( 'src' ), true, 'loaded when slide becomes visible' );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
viewDistance: 2
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,132 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Markdown Element Attributes</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<!-- <section data-markdown="example.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section> -->
|
|
||||||
|
|
||||||
<!-- Slides are separated by newline + three dashes + newline, vertical slides identical but two dashes -->
|
|
||||||
<section data-markdown data-separator="^\n---\n$" data-separator-vertical="^\n--\n$" data-element-attributes="{_\s*?([^}]+?)}">>
|
|
||||||
<script type="text/template">
|
|
||||||
## Slide 1.1
|
|
||||||
<!-- {_class="fragment fade-out" data-fragment-index="1"} -->
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
## Slide 1.2
|
|
||||||
<!-- {_class="fragment shrink"} -->
|
|
||||||
|
|
||||||
Paragraph 1
|
|
||||||
<!-- {_class="fragment grow"} -->
|
|
||||||
|
|
||||||
Paragraph 2
|
|
||||||
<!-- {_class="fragment grow"} -->
|
|
||||||
|
|
||||||
- list item 1 <!-- {_class="fragment grow"} -->
|
|
||||||
- list item 2 <!-- {_class="fragment grow"} -->
|
|
||||||
- list item 3 <!-- {_class="fragment grow"} -->
|
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Slide 2
|
|
||||||
|
|
||||||
|
|
||||||
Paragraph 1.2
|
|
||||||
multi-line <!-- {_class="fragment highlight-red"} -->
|
|
||||||
|
|
||||||
Paragraph 2.2 <!-- {_class="fragment highlight-red"} -->
|
|
||||||
|
|
||||||
Paragraph 2.3 <!-- {_class="fragment highlight-red"} -->
|
|
||||||
|
|
||||||
Paragraph 2.4 <!-- {_class="fragment highlight-red"} -->
|
|
||||||
|
|
||||||
- list item 1 <!-- {_class="fragment highlight-green"} -->
|
|
||||||
- list item 2<!-- {_class="fragment highlight-green"} -->
|
|
||||||
- list item 3<!-- {_class="fragment highlight-green"} -->
|
|
||||||
- list item 4
|
|
||||||
<!-- {_class="fragment highlight-green"} -->
|
|
||||||
- list item 5<!-- {_class="fragment highlight-green"} -->
|
|
||||||
|
|
||||||
Test
|
|
||||||
|
|
||||||
![Example Picture](examples/assets/image2.png) <!-- {_class="reveal stretch"} -->
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section data-markdown data-separator="^\n\n\n"
|
|
||||||
data-separator-vertical="^\n\n"
|
|
||||||
data-separator-notes="^Note:"
|
|
||||||
data-charset="utf-8">
|
|
||||||
<script type="text/template">
|
|
||||||
# Test attributes in Markdown with default separator
|
|
||||||
## Slide 1 Def <!-- .element: class="fragment highlight-red" data-fragment-index="1" -->
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2 Def
|
|
||||||
<!-- .element: class="fragment highlight-red" -->
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
## Hello world
|
|
||||||
A paragraph
|
|
||||||
<!-- .element: class="fragment highlight-blue" -->
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
## Hello world
|
|
||||||
|
|
||||||
Multiple
|
|
||||||
Line
|
|
||||||
<!-- .element: class="fragment highlight-blue" -->
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
## Hello world
|
|
||||||
|
|
||||||
Test<!-- .element: class="fragment highlight-blue" -->
|
|
||||||
|
|
||||||
More Test
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="../plugin/markdown/marked.js"></script>
|
|
||||||
<script src="../plugin/markdown/markdown.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script src="test-markdown-element-attributes.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,44 +0,0 @@
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'Markdown' );
|
|
||||||
|
|
||||||
QUnit.test( 'Vertical separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 4, 'found four slides' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on element header in vertical slides', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.fade-out' ).length, 1, 'found one vertical slide with class fragment.fade-out on header' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section h2.fragment.shrink' ).length, 1, 'found one vertical slide with class fragment.shrink on header' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on element paragraphs in vertical slides', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section p.fragment.grow' ).length, 2, 'found a vertical slide with two paragraphs with class fragment.grow' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on element list items in vertical slides', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on element paragraphs in horizontal slides', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-red' ).length, 4, 'found a horizontal slide with four paragraphs with class fragment.grow' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on element list items in horizontal slides', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section li.fragment.highlight-green' ).length, 5, 'found a horizontal slide with five list items with class fragment.roll-in' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on element image in horizontal slides', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section img.reveal.stretch' ).length, 1, 'found a horizontal slide with stretched image, class img.reveal.stretch' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on elements in vertical slides with default element attribute separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section h2.fragment.highlight-red' ).length, 2, 'found two h2 titles with fragment highlight-red in vertical slides with default element attribute separator' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Attributes on elements in single slides with default element attribute separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section p.fragment.highlight-blue' ).length, 3, 'found three elements with fragment highlight-blue in single slide with default element attribute separator' );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
|
@ -1,37 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Markdown</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
<!-- <section data-markdown="simple.md" data-separator="^\r?\n\r?\n\r?\n" data-separator-vertical="^\r?\n\r?\n"></section> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="../plugin/highlight/highlight.js"></script>
|
|
||||||
<script src="../plugin/markdown/marked.js"></script>
|
|
||||||
<script src="../plugin/markdown/markdown.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<!-- <script src="test-markdown-external.js"></script> -->
|
|
||||||
|
|
||||||
<!-- Test disabled 28/2/2019 by Hakim – Markdown plugin needs to be updated to load extenal files asycnhronously -->
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,20 +0,0 @@
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'Markdown' );
|
|
||||||
|
|
||||||
QUnit.test( 'Vertical separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Horizontal separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Language highlighter', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' );
|
|
||||||
assert.strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
|
@ -1,40 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Markdown Options</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
## Testing Markdown Options
|
|
||||||
|
|
||||||
This "slide" should contain 'smart' quotes.
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script src="test-markdown-options.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,27 +0,0 @@
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'Markdown' );
|
|
||||||
|
|
||||||
QUnit.test( 'Options are set', function( assert ) {
|
|
||||||
assert.strictEqual( marked.defaults.smartypants, true );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Smart quotes are activated', function( assert ) {
|
|
||||||
var text = document.querySelector( '.reveal .slides>section>p' ).textContent;
|
|
||||||
|
|
||||||
assert.strictEqual( /['"]/.test( text ), false );
|
|
||||||
assert.strictEqual( /[“”‘’]/.test( text ), true );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize({
|
|
||||||
dependencies: [
|
|
||||||
{ src: '../plugin/markdown/marked.js' },
|
|
||||||
// Test loading JS files with query strings
|
|
||||||
{ src: '../plugin/markdown/markdown.js?query=string' },
|
|
||||||
],
|
|
||||||
markdown: {
|
|
||||||
smartypants: true
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,127 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Markdown Attributes</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<!-- <section data-markdown="example.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section> -->
|
|
||||||
|
|
||||||
<!-- Slides are separated by three lines, vertical slides by two lines, attributes are one any line starting with (spaces and) two dashes -->
|
|
||||||
<section data-markdown data-separator="^\n\n\n"
|
|
||||||
data-separator-vertical="^\n\n"
|
|
||||||
data-separator-notes="^Note:"
|
|
||||||
data-attributes="--\s(.*?)$"
|
|
||||||
data-charset="utf-8">
|
|
||||||
<script type="text/template">
|
|
||||||
# Test attributes in Markdown
|
|
||||||
## Slide 1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2
|
|
||||||
<!-- -- id="slide2" data-transition="zoom" data-background="#A0C66B" -->
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2.1
|
|
||||||
<!-- -- data-background="#ff0000" data-transition="fade" -->
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2.2
|
|
||||||
[Link to Slide2](#/slide2)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 3
|
|
||||||
<!-- -- data-transition="zoom" data-background="#C6916B" -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 4
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown data-separator="^\n\n\n"
|
|
||||||
data-separator-vertical="^\n\n"
|
|
||||||
data-separator-notes="^Note:"
|
|
||||||
data-charset="utf-8">
|
|
||||||
<script type="text/template">
|
|
||||||
# Test attributes in Markdown with default separator
|
|
||||||
## Slide 1 Def
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2 Def
|
|
||||||
<!-- .slide: id="slide2def" data-transition="concave" data-background="#A7C66B" -->
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2.1 Def
|
|
||||||
<!-- .slide: data-background="#f70000" data-transition="page" -->
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 2.2 Def
|
|
||||||
[Link to Slide2](#/slide2def)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 3 Def
|
|
||||||
<!-- .slide: data-transition="concave" data-background="#C7916B" -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Slide 4
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
<!-- .slide: data-background="#ff0000" -->
|
|
||||||
## Hello world
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
## Hello world
|
|
||||||
<!-- .slide: data-background="#ff0000" -->
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section data-markdown>
|
|
||||||
<script type="text/template">
|
|
||||||
## Hello world
|
|
||||||
|
|
||||||
Test
|
|
||||||
<!-- .slide: data-background="#ff0000" -->
|
|
||||||
|
|
||||||
More Test
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="../plugin/markdown/marked.js"></script>
|
|
||||||
<script src="../plugin/markdown/markdown.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script src="test-markdown-slide-attributes.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,44 +0,0 @@
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'Markdown' );
|
|
||||||
|
|
||||||
QUnit.test( 'Vertical separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 6, 'found six vertical slides' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Id on slide', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section#slide2' ).length, 1, 'found one slide with id slide2' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section a[href="#/slide2"]' ).length, 1, 'found one slide with a link to slide2' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'data-background attributes', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A0C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#ff0000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C6916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'data-transition attributes', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="zoom"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="fade"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="zoom"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'data-background attributes with default separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#A7C66B"]' ).length, 1, 'found one vertical slide with data-background="#A0C66B"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-background="#f70000"]' ).length, 1, 'found one vertical slide with data-background="#ff0000"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#C7916B"]' ).length, 1, 'found one slide with data-background="#C6916B"' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'data-transition attributes with default separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="concave"]' ).length, 1, 'found one vertical slide with data-transition="zoom"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section[data-transition="page"]' ).length, 1, 'found one vertical slide with data-transition="fade"' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section [data-transition="concave"]' ).length, 1, 'found one slide with data-transition="zoom"' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'data-transition attributes with inline content', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section[data-background="#ff0000"]' ).length, 3, 'found three horizontal slides with data-background="#ff0000"' );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
|
@ -1,51 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Markdown</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<!-- <section data-markdown="example.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section> -->
|
|
||||||
|
|
||||||
<!-- Slides are separated by 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">
|
|
||||||
## Slide 1.1
|
|
||||||
|
|
||||||
--
|
|
||||||
|
|
||||||
## Slide 1.2
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Slide 2
|
|
||||||
</script>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="../plugin/markdown/marked.js"></script>
|
|
||||||
<script src="../plugin/markdown/markdown.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script src="test-markdown.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,11 +0,0 @@
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'Markdown' );
|
|
||||||
|
|
||||||
QUnit.test( 'Vertical separator', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
|
@ -1,82 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test PDF exports</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="../css/print/pdf.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1>1</h1>
|
|
||||||
<img data-src="">
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<section>
|
|
||||||
<h1>2.1</h1>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h1>2.2</h1>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h1>2.3</h1>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="fragment-slides">
|
|
||||||
<section>
|
|
||||||
<h1>3.1</h1>
|
|
||||||
<ul>
|
|
||||||
<li class="fragment">4.1</li>
|
|
||||||
<li class="fragment">4.2</li>
|
|
||||||
<li class="fragment">4.3</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1>3.2</h1>
|
|
||||||
<ul>
|
|
||||||
<li class="fragment" data-fragment-index="0">4.1</li>
|
|
||||||
<li class="fragment" data-fragment-index="0">4.2</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1>3.3</h1>
|
|
||||||
<ul>
|
|
||||||
<li class="fragment" data-fragment-index="1">3.3.1</li>
|
|
||||||
<li class="fragment" data-fragment-index="4">3.3.2</li>
|
|
||||||
<li class="fragment" data-fragment-index="4">3.3.3</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1>4</h1>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script src="test-pdf.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,12 +0,0 @@
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
// Only one test for now, we're mainly ensuring that there
|
|
||||||
// are no execution errors when running PDF mode
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isReady', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.isReady(), true, 'returns true' );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize({ pdf: true });
|
|
|
@ -1,105 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test Plugins</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>Slide content</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
QUnit.module( 'Plugins' );
|
|
||||||
|
|
||||||
var initCounter = { PluginB: 0, PluginC: 0, PluginD: 0 };
|
|
||||||
|
|
||||||
// Plugin with no init method
|
|
||||||
var PluginA = {};
|
|
||||||
|
|
||||||
// Plugin with init method
|
|
||||||
var PluginB = { init: function() {
|
|
||||||
initCounter['PluginB'] += 1;
|
|
||||||
} };
|
|
||||||
|
|
||||||
// Async plugin with init method
|
|
||||||
var PluginC = { init: function() {
|
|
||||||
return new Promise(function( resolve ) {
|
|
||||||
setTimeout( () => {
|
|
||||||
initCounter['PluginC'] += 1;
|
|
||||||
resolve();
|
|
||||||
}, 1000 );
|
|
||||||
});
|
|
||||||
} };
|
|
||||||
|
|
||||||
// Plugin initialized after reveal.js is ready
|
|
||||||
var PluginD = { init: function() {
|
|
||||||
initCounter['PluginD'] += 1;
|
|
||||||
} };
|
|
||||||
|
|
||||||
var PluginE = {};
|
|
||||||
|
|
||||||
Reveal.registerPlugin( 'PluginA', PluginA );
|
|
||||||
Reveal.registerPlugin( 'PluginB', PluginB );
|
|
||||||
Reveal.registerPlugin( 'PluginC', PluginC );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
||||||
|
|
||||||
QUnit.test( 'Can initialize synchronously', function( assert ) {
|
|
||||||
assert.strictEqual( initCounter['PluginB'], 1 );
|
|
||||||
|
|
||||||
Reveal.registerPlugin( 'PluginB', PluginB );
|
|
||||||
|
|
||||||
assert.strictEqual( initCounter['PluginB'], 1, 'prevents duplicate registration' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Can initialize asynchronously', function( assert ) {
|
|
||||||
assert.expect( 3 );
|
|
||||||
var done = assert.async( 2 );
|
|
||||||
|
|
||||||
assert.strictEqual( initCounter['PluginC'], 0, 'async plugin not immediately initialized' );
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
assert.strictEqual( initCounter['PluginC'], 1, 'finsihed initializing when reveal.js dispatches "ready"' );
|
|
||||||
done();
|
|
||||||
|
|
||||||
Reveal.registerPlugin( 'PluginD', PluginD );
|
|
||||||
assert.strictEqual( initCounter['PluginD'], 1, 'plugin registered after reveal.js is ready still initiailizes' );
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
} );
|
|
||||||
|
|
||||||
QUnit.test( 'Can check if plugin is registered', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.hasPlugin( 'PluginA' ), true );
|
|
||||||
assert.strictEqual( Reveal.hasPlugin( 'PluginE' ), false );
|
|
||||||
Reveal.registerPlugin( 'PluginE', PluginE );
|
|
||||||
assert.strictEqual( Reveal.hasPlugin( 'PluginE' ), true );
|
|
||||||
} );
|
|
||||||
|
|
||||||
QUnit.test( 'Can retrieve plugin instance', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.getPlugin( 'PluginB' ), PluginB );
|
|
||||||
} );
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,139 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Test State</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section>No state</section>
|
|
||||||
<section id="slide2" data-state="state1">State 1</section>
|
|
||||||
<section data-state="state1">State 1</section>
|
|
||||||
<section data-state="state2">State 2</section>
|
|
||||||
<section>
|
|
||||||
<section>No state</section>
|
|
||||||
<section data-state="state1">State 1</section>
|
|
||||||
<section data-state="state3">State 3</section>
|
|
||||||
<section>No state</section>
|
|
||||||
</section>
|
|
||||||
<section>No state</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
QUnit.module( 'State' );
|
|
||||||
|
|
||||||
QUnit.test( 'Fire events when changing slide', function( assert ) {
|
|
||||||
assert.expect( 2 );
|
|
||||||
var state1 = assert.async();
|
|
||||||
var state2 = assert.async();
|
|
||||||
|
|
||||||
var _onState1 = function( event ) {
|
|
||||||
assert.ok( true, 'state1 fired' );
|
|
||||||
state1();
|
|
||||||
}
|
|
||||||
|
|
||||||
var _onState2 = function( event ) {
|
|
||||||
assert.ok( true, 'state2 fired' );
|
|
||||||
state2();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'state1', _onState1 );
|
|
||||||
Reveal.addEventListener( 'state2', _onState2 );
|
|
||||||
|
|
||||||
Reveal.slide( 1 );
|
|
||||||
Reveal.slide( 3 );
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'state1', _onState1 );
|
|
||||||
Reveal.removeEventListener( 'state2', _onState2 );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Fire state events for vertical slides', function( assert ) {
|
|
||||||
assert.expect( 2 );
|
|
||||||
var done = assert.async( 2 );
|
|
||||||
|
|
||||||
var _onState1 = function( event ) {
|
|
||||||
assert.ok( true, 'state1 fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
var _onState3 = function( event ) {
|
|
||||||
assert.ok( true, 'state3 fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'state1', _onState1 );
|
|
||||||
Reveal.addEventListener( 'state3', _onState3 );
|
|
||||||
|
|
||||||
Reveal.slide( 0 );
|
|
||||||
Reveal.slide( 4, 1 );
|
|
||||||
Reveal.slide( 4, 2 );
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'state1', _onState1 );
|
|
||||||
Reveal.removeEventListener( 'state3', _onState3 );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'No events if state remains unchanged', function( assert ) {
|
|
||||||
var stateChanges = 0;
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
stateChanges += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'state1', _onEvent );
|
|
||||||
|
|
||||||
Reveal.slide( 0 ); // no state
|
|
||||||
Reveal.slide( 1 ); // state1
|
|
||||||
Reveal.slide( 2 ); // state1
|
|
||||||
Reveal.prev(); // state1
|
|
||||||
Reveal.next(); // state1
|
|
||||||
Reveal.slide( 4, 1 ); // state1
|
|
||||||
Reveal.slide( 0 ); // no state
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'state1', _onEvent );
|
|
||||||
|
|
||||||
assert.strictEqual( stateChanges, 1, 'no event was fired when going to slide with same state' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Event order', function( assert ) {
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( Reveal.getCurrentSlide() == document.querySelector( '#slide2' ), 'correct current slide immediately after state event' );
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'state1', _onEvent );
|
|
||||||
|
|
||||||
Reveal.slide( 0 );
|
|
||||||
Reveal.slide( 1 );
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'state1', _onEvent );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,85 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
|
|
||||||
<title>reveal.js - Tests</title>
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="../css/reveal.css">
|
|
||||||
<link rel="stylesheet" href="qunit-2.5.0.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body style="overflow: auto;">
|
|
||||||
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
|
|
||||||
<div class="reveal" style="display: none;">
|
|
||||||
|
|
||||||
<div class="slides">
|
|
||||||
|
|
||||||
<section data-background-image="examples/assets/image1.png">
|
|
||||||
<h1>1</h1>
|
|
||||||
<img data-src="">
|
|
||||||
<video data-src=""></video>
|
|
||||||
<audio data-src=""></audio>
|
|
||||||
<aside class="notes">speaker notes 1</aside>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<section data-background="examples/assets/image2.png" data-notes="speaker notes 2">
|
|
||||||
<h1>2.1</h1>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h1>2.2</h1>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<h1>2.3</h1>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="fragment-slides">
|
|
||||||
<section>
|
|
||||||
<h1>3.1</h1>
|
|
||||||
<ul>
|
|
||||||
<li class="fragment">4.1</li>
|
|
||||||
<li class="fragment">4.2</li>
|
|
||||||
<li class="fragment">4.3</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1>3.2</h1>
|
|
||||||
<ul>
|
|
||||||
<li class="fragment" data-fragment-index="0">4.1</li>
|
|
||||||
<li class="fragment" data-fragment-index="0">4.2</li>
|
|
||||||
</ul>
|
|
||||||
<iframe data-src="http://example.com"></iframe>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1>3.3</h1>
|
|
||||||
<ul>
|
|
||||||
<li class="fragment" data-fragment-index="1">3.3.1</li>
|
|
||||||
<li class="fragment" data-fragment-index="4">3.3.2</li>
|
|
||||||
<li class="fragment" data-fragment-index="4">3.3.3</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1>4</h1>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../js/reveal.js"></script>
|
|
||||||
<script src="qunit-2.5.0.js"></script>
|
|
||||||
|
|
||||||
<script src="test.js"></script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
598
test/test.js
598
test/test.js
|
@ -1,598 +0,0 @@
|
||||||
// These tests expect the DOM to contain a presentation
|
|
||||||
// with the following slide structure:
|
|
||||||
//
|
|
||||||
// 1
|
|
||||||
// 2 - Three sub-slides
|
|
||||||
// 3 - Three fragment elements
|
|
||||||
// 3 - Two fragments with same data-fragment-index
|
|
||||||
// 4
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'ready', function() {
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// DOM TESTS
|
|
||||||
|
|
||||||
QUnit.module( 'DOM' );
|
|
||||||
|
|
||||||
QUnit.test( 'Initial slides classes', function( assert ) {
|
|
||||||
var horizontalSlides = document.querySelectorAll( '.reveal .slides>section' )
|
|
||||||
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section.past' ).length, 0, 'no .past slides' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section.present' ).length, 1, 'one .present slide' );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides>section.future' ).length, horizontalSlides.length - 1, 'remaining horizontal slides are .future' );
|
|
||||||
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal .slides section.stack' ).length, 2, 'two .stacks' );
|
|
||||||
|
|
||||||
assert.ok( document.querySelectorAll( '.reveal .slides section.stack' )[0].querySelectorAll( '.future' ).length > 0, 'vertical slides are given .future' );
|
|
||||||
});
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// API TESTS
|
|
||||||
|
|
||||||
QUnit.module( 'API' );
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isReady', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.isReady(), true, 'returns true' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isOverview', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.isOverview(), false, 'false by default' );
|
|
||||||
|
|
||||||
Reveal.toggleOverview();
|
|
||||||
assert.strictEqual( Reveal.isOverview(), true, 'true after toggling on' );
|
|
||||||
|
|
||||||
Reveal.toggleOverview();
|
|
||||||
assert.strictEqual( Reveal.isOverview(), false, 'false after toggling off' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isPaused', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.isPaused(), false, 'false by default' );
|
|
||||||
|
|
||||||
Reveal.togglePause();
|
|
||||||
assert.strictEqual( Reveal.isPaused(), true, 'true after pausing' );
|
|
||||||
|
|
||||||
Reveal.togglePause();
|
|
||||||
assert.strictEqual( Reveal.isPaused(), false, 'false after resuming' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isFirstSlide', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
|
||||||
|
|
||||||
Reveal.slide( 1, 0 );
|
|
||||||
assert.strictEqual( Reveal.isFirstSlide(), false, 'false after Reveal.slide( 1, 0 )' );
|
|
||||||
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isFirstSlide after vertical slide', function( assert ) {
|
|
||||||
Reveal.slide( 1, 1 );
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( 0, 0 )' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isLastSlide', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
|
||||||
|
|
||||||
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
|
||||||
|
|
||||||
Reveal.slide( lastSlideIndex, 0 );
|
|
||||||
assert.strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
|
||||||
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( Reveal.isLastSlide(), false, 'false after Reveal.slide( 0, 0 )' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isLastSlide after vertical slide', function( assert ) {
|
|
||||||
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
|
||||||
|
|
||||||
Reveal.slide( 1, 1 );
|
|
||||||
Reveal.slide( lastSlideIndex );
|
|
||||||
assert.strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( '+ lastSlideIndex +', 0 )' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getTotalSlides', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.getTotalSlides(), 8, 'eight slides in total' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getIndices', function( assert ) {
|
|
||||||
var indices = Reveal.getIndices();
|
|
||||||
|
|
||||||
assert.ok( indices.hasOwnProperty( 'h' ), 'h exists' );
|
|
||||||
assert.ok( indices.hasOwnProperty( 'v' ), 'v exists' );
|
|
||||||
assert.ok( indices.hasOwnProperty( 'f' ), 'f exists' );
|
|
||||||
|
|
||||||
Reveal.slide( 1, 0 );
|
|
||||||
assert.strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
|
||||||
assert.strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
|
||||||
|
|
||||||
Reveal.slide( 1, 2 );
|
|
||||||
assert.strictEqual( Reveal.getIndices().h, 1, 'h 1' );
|
|
||||||
assert.strictEqual( Reveal.getIndices().v, 2, 'v 2' );
|
|
||||||
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( Reveal.getIndices().h, 0, 'h 0' );
|
|
||||||
assert.strictEqual( Reveal.getIndices().v, 0, 'v 0' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getSlide', function( assert ) {
|
|
||||||
assert.equal( Reveal.getSlide( 0 ), document.querySelector( '.reveal .slides>section:first-child' ), 'gets correct first slide' );
|
|
||||||
assert.equal( Reveal.getSlide( 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)' ), 'no v index returns stack' );
|
|
||||||
assert.equal( Reveal.getSlide( 1, 0 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(1)' ), 'v index 0 returns first vertical child' );
|
|
||||||
assert.equal( Reveal.getSlide( 1, 1 ), document.querySelector( '.reveal .slides>section:nth-child(2)>section:nth-child(2)' ), 'v index 1 returns second vertical child' );
|
|
||||||
|
|
||||||
assert.strictEqual( Reveal.getSlide( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
|
||||||
assert.strictEqual( Reveal.getSlide( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getSlideBackground', function( assert ) {
|
|
||||||
assert.equal( Reveal.getSlideBackground( 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:first-child' ), 'gets correct first background' );
|
|
||||||
assert.equal( Reveal.getSlideBackground( 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2)' ), 'no v index returns stack' );
|
|
||||||
assert.equal( Reveal.getSlideBackground( 1, 0 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(2)' ), 'v index 0 returns first vertical child' );
|
|
||||||
assert.equal( Reveal.getSlideBackground( 1, 1 ), document.querySelector( '.reveal .backgrounds>.slide-background:nth-child(2) .slide-background:nth-child(3)' ), 'v index 1 returns second vertical child' );
|
|
||||||
|
|
||||||
assert.strictEqual( Reveal.getSlideBackground( 100 ), undefined, 'undefined when out of horizontal bounds' );
|
|
||||||
assert.strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getSlideNotes', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.ok( Reveal.getSlideNotes() === 'speaker notes 1', 'works with <aside class="notes">' );
|
|
||||||
|
|
||||||
Reveal.slide( 1, 0 );
|
|
||||||
assert.ok( Reveal.getSlideNotes() === 'speaker notes 2', 'works with <section data-notes="">' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getPreviousSlide/getCurrentSlide', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
Reveal.slide( 1, 0 );
|
|
||||||
|
|
||||||
var firstSlide = document.querySelector( '.reveal .slides>section:first-child' );
|
|
||||||
var secondSlide = document.querySelector( '.reveal .slides>section:nth-child(2)>section' );
|
|
||||||
|
|
||||||
assert.equal( Reveal.getPreviousSlide(), firstSlide, 'previous is slide #0' );
|
|
||||||
assert.equal( Reveal.getCurrentSlide(), secondSlide, 'current is slide #1' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getProgress', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( Reveal.getProgress(), 0, 'progress is 0 on first slide' );
|
|
||||||
|
|
||||||
var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
|
|
||||||
|
|
||||||
Reveal.slide( lastSlideIndex, 0 );
|
|
||||||
assert.strictEqual( Reveal.getProgress(), 1, 'progress is 1 on last slide' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getScale', function( assert ) {
|
|
||||||
assert.ok( typeof Reveal.getScale() === 'number', 'has scale' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.getConfig', function( assert ) {
|
|
||||||
assert.ok( typeof Reveal.getConfig() === 'object', 'has config' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.configure', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.getConfig().loop, false, '"loop" is false to start with' );
|
|
||||||
|
|
||||||
Reveal.configure({ loop: true });
|
|
||||||
assert.strictEqual( Reveal.getConfig().loop, true, '"loop" has changed to true' );
|
|
||||||
|
|
||||||
Reveal.configure({ loop: false, customTestValue: 1 });
|
|
||||||
assert.strictEqual( Reveal.getConfig().customTestValue, 1, 'supports custom values' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.availableRoutes', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.deepEqual( Reveal.availableRoutes(), { left: false, up: false, down: false, right: true }, 'correct for first slide' );
|
|
||||||
|
|
||||||
Reveal.slide( 1, 0 );
|
|
||||||
assert.deepEqual( Reveal.availableRoutes(), { left: true, up: false, down: true, right: true }, 'correct for vertical slide' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.next', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
|
|
||||||
// Step through vertical child slides
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 0, f: undefined } );
|
|
||||||
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 1, f: undefined } );
|
|
||||||
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 1, v: 2, f: undefined } );
|
|
||||||
|
|
||||||
// Step through fragments
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 } );
|
|
||||||
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 } );
|
|
||||||
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 } );
|
|
||||||
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 } );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.next at end', function( assert ) {
|
|
||||||
Reveal.slide( 3 );
|
|
||||||
|
|
||||||
// We're at the end, this should have no effect
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
|
||||||
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 3, v: 0, f: undefined } );
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// FRAGMENT TESTS
|
|
||||||
|
|
||||||
QUnit.module( 'Fragments' );
|
|
||||||
|
|
||||||
QUnit.test( 'Sliding to fragments', function( assert ) {
|
|
||||||
Reveal.slide( 2, 0, -1 );
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: -1 }, 'Reveal.slide( 2, 0, -1 )' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0, 0 );
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'Reveal.slide( 2, 0, 0 )' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0, 2 );
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'Reveal.slide( 2, 0, 2 )' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0, 1 );
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'Reveal.slide( 2, 0, 1 )' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Hiding all fragments', function( assert ) {
|
|
||||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0, 0 );
|
|
||||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 1, 'one fragment visible when index is 0' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0, -1 );
|
|
||||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when index is -1' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Current fragment', function( assert ) {
|
|
||||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
|
||||||
var lastFragmentIndex = [].slice.call( fragmentSlide.querySelectorAll( '.fragment' ) ).pop().getAttribute( 'data-fragment-index' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0 );
|
|
||||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment at index -1' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0, 0 );
|
|
||||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 1, 'one current fragment at index 0' );
|
|
||||||
|
|
||||||
Reveal.slide( 1, 0, 0 );
|
|
||||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to previous slide' );
|
|
||||||
|
|
||||||
Reveal.slide( 3, 0, 0 );
|
|
||||||
assert.strictEqual( fragmentSlide.querySelectorAll( '.fragment.current-fragment' ).length, 0, 'no current fragment when navigating to next slide' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 1, -1 );
|
|
||||||
Reveal.prev();
|
|
||||||
assert.strictEqual( fragmentSlide.querySelector( '.fragment.current-fragment' ).getAttribute( 'data-fragment-index' ), lastFragmentIndex, 'last fragment is current fragment when returning from future slide' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Stepping through fragments', function( assert ) {
|
|
||||||
Reveal.slide( 2, 0, -1 );
|
|
||||||
|
|
||||||
// forwards:
|
|
||||||
|
|
||||||
Reveal.next();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'next() goes to next fragment' );
|
|
||||||
|
|
||||||
Reveal.right();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'right() goes to next fragment' );
|
|
||||||
|
|
||||||
Reveal.down();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'down() goes to next fragment' );
|
|
||||||
|
|
||||||
Reveal.down(); // moves to f #3
|
|
||||||
|
|
||||||
// backwards:
|
|
||||||
|
|
||||||
Reveal.prev();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 2 }, 'prev() goes to prev fragment' );
|
|
||||||
|
|
||||||
Reveal.left();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 1 }, 'left() goes to prev fragment' );
|
|
||||||
|
|
||||||
Reveal.up();
|
|
||||||
assert.deepEqual( Reveal.getIndices(), { h: 2, v: 0, f: 0 }, 'up() goes to prev fragment' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Stepping past fragments', function( assert ) {
|
|
||||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
|
||||||
|
|
||||||
Reveal.slide( 0, 0, 0 );
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 0, 'no fragments visible when on previous slide' );
|
|
||||||
|
|
||||||
Reveal.slide( 3, 0, 0 );
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 3, 'all fragments visible when on future slide' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Fragment indices', function( assert ) {
|
|
||||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(2)' );
|
|
||||||
|
|
||||||
Reveal.slide( 3, 0, 0 );
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment.visible' ).length, 2, 'both fragments of same index are shown' );
|
|
||||||
|
|
||||||
// This slide has three fragments, first one is index 0, second and third have index 1
|
|
||||||
Reveal.slide( 2, 2, 0 );
|
|
||||||
assert.equal( Reveal.getIndices().f, 0, 'returns correct index for first fragment' );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 2, 1 );
|
|
||||||
assert.equal( Reveal.getIndices().f, 1, 'returns correct index for two fragments with same index' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Index generation', function( assert ) {
|
|
||||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(1)' );
|
|
||||||
|
|
||||||
// These have no indices defined to start with
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '2' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Index normalization', function( assert ) {
|
|
||||||
var fragmentSlide = document.querySelector( '#fragment-slides>section:nth-child(3)' );
|
|
||||||
|
|
||||||
// These start out as 1-4-4 and should normalize to 0-1-1
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[0].getAttribute( 'data-fragment-index' ), '0' );
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[1].getAttribute( 'data-fragment-index' ), '1' );
|
|
||||||
assert.equal( fragmentSlide.querySelectorAll( '.fragment' )[2].getAttribute( 'data-fragment-index' ), '1' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'fragmentshown event', function( assert ) {
|
|
||||||
assert.expect( 2 );
|
|
||||||
var done = assert.async( 2 );
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( true, 'event fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'fragmentshown', _onEvent );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0 );
|
|
||||||
Reveal.slide( 2, 0 ); // should do nothing
|
|
||||||
Reveal.slide( 2, 0, 0 ); // should do nothing
|
|
||||||
Reveal.next();
|
|
||||||
Reveal.next();
|
|
||||||
Reveal.prev(); // shouldn't fire fragmentshown
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'fragmentshown', _onEvent );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'fragmenthidden event', function( assert ) {
|
|
||||||
assert.expect( 2 );
|
|
||||||
var done = assert.async( 2 );
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( true, 'event fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'fragmenthidden', _onEvent );
|
|
||||||
|
|
||||||
Reveal.slide( 2, 0, 2 );
|
|
||||||
Reveal.slide( 2, 0, 2 ); // should do nothing
|
|
||||||
Reveal.prev();
|
|
||||||
Reveal.prev();
|
|
||||||
Reveal.next(); // shouldn't fire fragmenthidden
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'fragmenthidden', _onEvent );
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// AUTO-SLIDE TESTS
|
|
||||||
|
|
||||||
QUnit.module( 'Auto Sliding' );
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.isAutoSliding', function( assert ) {
|
|
||||||
assert.strictEqual( Reveal.isAutoSliding(), false, 'false by default' );
|
|
||||||
|
|
||||||
Reveal.configure({ autoSlide: 10000 });
|
|
||||||
assert.strictEqual( Reveal.isAutoSliding(), true, 'true after starting' );
|
|
||||||
|
|
||||||
Reveal.configure({ autoSlide: 0 });
|
|
||||||
assert.strictEqual( Reveal.isAutoSliding(), false, 'false after setting to 0' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Reveal.toggleAutoSlide', function( assert ) {
|
|
||||||
Reveal.configure({ autoSlide: 10000 });
|
|
||||||
|
|
||||||
Reveal.toggleAutoSlide();
|
|
||||||
assert.strictEqual( Reveal.isAutoSliding(), false, 'false after first toggle' );
|
|
||||||
Reveal.toggleAutoSlide();
|
|
||||||
assert.strictEqual( Reveal.isAutoSliding(), true, 'true after second toggle' );
|
|
||||||
|
|
||||||
Reveal.configure({ autoSlide: 0 });
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'autoslidepaused', function( assert ) {
|
|
||||||
assert.expect( 1 );
|
|
||||||
var done = assert.async();
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( true, 'event fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'autoslidepaused', _onEvent );
|
|
||||||
Reveal.configure({ autoSlide: 10000 });
|
|
||||||
Reveal.toggleAutoSlide();
|
|
||||||
|
|
||||||
// cleanup
|
|
||||||
Reveal.configure({ autoSlide: 0 });
|
|
||||||
Reveal.removeEventListener( 'autoslidepaused', _onEvent );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'autoslideresumed', function( assert ) {
|
|
||||||
assert.expect( 1 );
|
|
||||||
var done = assert.async();
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( true, 'event fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'autoslideresumed', _onEvent );
|
|
||||||
Reveal.configure({ autoSlide: 10000 });
|
|
||||||
Reveal.toggleAutoSlide();
|
|
||||||
Reveal.toggleAutoSlide();
|
|
||||||
|
|
||||||
// cleanup
|
|
||||||
Reveal.configure({ autoSlide: 0 });
|
|
||||||
Reveal.removeEventListener( 'autoslideresumed', _onEvent );
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// CONFIGURATION VALUES
|
|
||||||
|
|
||||||
QUnit.module( 'Configuration' );
|
|
||||||
|
|
||||||
QUnit.test( 'Controls', function( assert ) {
|
|
||||||
var controlsElement = document.querySelector( '.reveal>.controls' );
|
|
||||||
|
|
||||||
Reveal.configure({ controls: false });
|
|
||||||
assert.equal( controlsElement.style.display, 'none', 'controls are hidden' );
|
|
||||||
|
|
||||||
Reveal.configure({ controls: true });
|
|
||||||
assert.equal( controlsElement.style.display, 'block', 'controls are visible' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Progress', function( assert ) {
|
|
||||||
var progressElement = document.querySelector( '.reveal>.progress' );
|
|
||||||
|
|
||||||
Reveal.configure({ progress: false });
|
|
||||||
assert.equal( progressElement.style.display, 'none', 'progress are hidden' );
|
|
||||||
|
|
||||||
Reveal.configure({ progress: true });
|
|
||||||
assert.equal( progressElement.style.display, 'block', 'progress are visible' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'Loop', function( assert ) {
|
|
||||||
Reveal.configure({ loop: true });
|
|
||||||
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
|
|
||||||
Reveal.left();
|
|
||||||
assert.notEqual( Reveal.getIndices().h, 0, 'looped from start to end' );
|
|
||||||
|
|
||||||
Reveal.right();
|
|
||||||
assert.equal( Reveal.getIndices().h, 0, 'looped from end to start' );
|
|
||||||
|
|
||||||
Reveal.configure({ loop: false });
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// LAZY-LOADING TESTS
|
|
||||||
|
|
||||||
QUnit.module( 'Lazy-Loading' );
|
|
||||||
|
|
||||||
QUnit.test( 'img with data-src', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'video with data-src', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal section video[src]' ).length, 1, 'Video source has been set' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'audio with data-src', function( assert ) {
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal section audio[src]' ).length, 1, 'Audio source has been set' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'iframe with data-src', function( assert ) {
|
|
||||||
Reveal.slide( 0, 0 );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
|
|
||||||
Reveal.slide( 2, 1 );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 1, 'Iframe source is set' );
|
|
||||||
Reveal.slide( 2, 2 );
|
|
||||||
assert.strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'background images', function( assert ) {
|
|
||||||
var imageSource1 = Reveal.getSlide( 0 ).getAttribute( 'data-background-image' );
|
|
||||||
var imageSource2 = Reveal.getSlide( 1, 0 ).getAttribute( 'data-background' );
|
|
||||||
|
|
||||||
// check that the images are applied to the background elements
|
|
||||||
assert.ok( Reveal.getSlideBackground( 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource1 ) !== -1, 'data-background-image worked' );
|
|
||||||
assert.ok( Reveal.getSlideBackground( 1, 0 ).querySelector( '.slide-background-content' ).style.backgroundImage.indexOf( imageSource2 ) !== -1, 'data-background worked' );
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
|
||||||
// EVENT TESTS
|
|
||||||
|
|
||||||
QUnit.module( 'Events' );
|
|
||||||
|
|
||||||
QUnit.test( 'slidechanged', function( assert ) {
|
|
||||||
assert.expect( 3 );
|
|
||||||
var done = assert.async( 3 );
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( true, 'event fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'slidechanged', _onEvent );
|
|
||||||
|
|
||||||
Reveal.slide( 1, 0 ); // should trigger
|
|
||||||
Reveal.slide( 1, 0 ); // should do nothing
|
|
||||||
Reveal.next(); // should trigger
|
|
||||||
Reveal.slide( 3, 0 ); // should trigger
|
|
||||||
Reveal.next(); // should do nothing
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'slidechanged', _onEvent );
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'paused', function( assert ) {
|
|
||||||
assert.expect( 1 );
|
|
||||||
var done = assert.async();
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( true, 'event fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'paused', _onEvent );
|
|
||||||
|
|
||||||
Reveal.togglePause();
|
|
||||||
Reveal.togglePause();
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'paused', _onEvent );
|
|
||||||
});
|
|
||||||
|
|
||||||
QUnit.test( 'resumed', function( assert ) {
|
|
||||||
assert.expect( 1 );
|
|
||||||
var done = assert.async();
|
|
||||||
|
|
||||||
var _onEvent = function( event ) {
|
|
||||||
assert.ok( true, 'event fired' );
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
Reveal.addEventListener( 'resumed', _onEvent );
|
|
||||||
|
|
||||||
Reveal.togglePause();
|
|
||||||
Reveal.togglePause();
|
|
||||||
|
|
||||||
Reveal.removeEventListener( 'resumed', _onEvent );
|
|
||||||
});
|
|
||||||
|
|
||||||
} );
|
|
||||||
|
|
||||||
Reveal.initialize();
|
|
Loading…
Reference in New Issue
Block a user