-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo.html
90 lines (87 loc) · 4.24 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>FsFx for Reveal.js</title>
<meta name="description" content="">
<meta name="author" content="Martinomagnifico">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="../dist/reset.css">
<link rel="stylesheet" href="../dist/reveal.css">
<link rel="stylesheet" href="../dist/theme/black.css">
<link rel="stylesheet" href="css/demo.css">
</head>
<body>
<div class="reveal" data-fs-toggle="fullscreen">
<div class="slides">
<section class="center" data-transition="fade">
<h1>FsFx</h1>
<h3>for Reveal.js</h3>
<button class="bigbutton fsbutton" data-fs-gonext="1500">Start the show!</button>
<div class="fsfx-disabled"><br>
<p style="color: #42affa; width: 80%; margin: auto">Note: This device does not support the Fullscreen API.</p>
</div>
</section>
<section class="center" data-transition="zoom-in fade-out">
<h3>FsFx.js</h3><small>Can do a few things:</small><br>
<ol>
<li>Enter or exit fullscreen</li>
<li>Trigger 'next slide' after fullscreen</li>
<li>Toggle a class on any element if fullscreen</li>
<li>Auto-generate a fullscreen button</li>
</ol><br>
<p class="small">If a device does not support the Fullscreen API, a class of <code>no-fsfx</code> will be added to the body. You can use it to show warnings, hide elements etcetera.</p>
</section>
<section class="center">
<h4>1. Enter or exit fullscreen</h4>
<ul>
<li>Triggers if an element with a certain class is clicked</li>
<li>This baseclass is 'fsbutton' by default</li>
<li>The baseclass can easily be changed in the plugin options</li>
</ul>
</section>
<section class="center">
<h4>2. Trigger 'next slide' after fullscreen</h4><small>The start button on the first page of this deck does exactly that</small><br><br>
<ul>
<li>If wanted, a 'next slide' function can be called</li>
<li>It can be added with a <code>data-fs-gonext="*"</code> attribute</li>
<li>The wildcard is the time in milliseconds for a delay</li>
</ul>
</section>
<section class="center">
<h4>3. Toggle a class on any element if the presentation is fullscreen</h4>
<ul>
<li>A class toggle can be added with a <code>data-fs-toggle="*"</code> attribute</li>
<li>The wildcard is the class that is toggled in fullscreen</li>
<li class="fsfx-enabled">In this presentation, see the changes in fullscreen: The background and the button icons</li>
</ul>
<button class="bigbutton fsbutton icon-fs" data-fs-toggle="icon-fsexit">Toggle Fullscreen</button>
</section>
<section class="center" data-background="white">
<h4>4. Auto-generate a fullscreen button</h4>
<ul>
<li>FsFx can generate a fullscreen button in your presentation <span class="fsfx-enabled">(like in this presentation)</span></li>
<li>This will only be done if no such button already exists</li>
<li>The styling of the auto-generated button is included, but you can tweak color and position</li>
</ul>
</section>
</div>
</div>
<script src="../dist/reveal.js"></script>
<script src="plugin/fsfx/fsfx.js"></script>
<script>
Reveal.initialize({
transition: "slide",
history: true,
fsfx: {
baseclass: "fsbutton",
compatibility: false
},
plugins: [
FsFx
]
});
</script>
</body>
</html>