1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
5 <html xmlns="http://www.w3.org/1999/xhtml">
7 <title>SimpleWebSlides</title>
9 <meta http-equiv="Content-Type"
10 content="text/html; charset=utf-8" />
11 <meta name="copyright"
12 content="Copyright © 2013 Kim Nguyễn" />
15 <script src="../jquery-1.9.1.min.js" type="text/javascript" ></script>
17 <!-- Initialize the library -->
18 <link rel="stylesheet" href="../simpleWebSlides.css" type="text/css"
20 <script src="../simpleWebSlides.js" type="text/javascript" >
23 <!-- Load a custom Theme -->
24 <link rel="stylesheet" title="Web 2.0"
25 href="../themes/webTwoPointO.css"
27 <!-- Customize some templates and initialize -->
29 <script type="text/x-mathjax-config">
31 tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]}
35 <script type="text/javascript"
36 src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
39 <script type="text/javascript">
41 SWS.Config['sws-slide-change'] = SWS.Effects.slideChangeVerticalSlide;
42 SWS.Config['sws-slide-change'] = SWS.Effects.slideChangeHorizontalSlide; */
43 SWS.Config['sws-slide-change'] = SWS.Effects.slideChangeFadeOutIn;
46 SWS.Config['sws-object-deactivate'] = SWS.Effects.objectDeactivateFadeOut;
47 SWS.Config['sws-object-activate'] = SWS.Effects.objectActivateFadeIn;
49 //Ensures that we load SWS at the very end, after MathJax has
51 MathJax.Hub.Queue(function () {
52 SWS.Presentation.init();
55 // Some utility functions:
56 function set_color(o,c) {
57 var style = o.attr("style");
58 var a = style.split(";");
59 for(var i = 0; i < a.length; i++){
60 if (a[i].indexOf("fill:") >= 0){
65 o.attr("style",a.join(";"));
71 <style type="text/css">
76 -webkit-transform: rotate(-20deg);
77 -moz-transform: rotate(-20deg);
83 <div class="sws-slide sws-cover sws-option-nofooter">
84 <div class="centerbox">
85 <h1>SimpleWebSlides</h1>
86 <h1>An <em>HTML</em><img style="height:28pt"
87 src="HTML5_Badge.svg" alt="5"/>
88 Presentation framework</h1>
89 <a href="mailto:kim@nguyen.vg">kim@nguyen.vg</a>
93 <!-- H1 below is hidden, used for table of content (TODO) -->
96 <div class="sws-slide" >
98 <em>SimpleWebSlides</em> is simple tool that allows
99 you to build funky presentations:
101 <li class="sws-pause" >Write your presentations in (X)HTML5!</li>
102 <li class="sws-pause" >Theme to
103 your <span style='font-size:larger'>❤</span>'s content
104 with <em id="css">C S S</em>!</li>
105 <li class="sws-pause" >Create animations using Javascript & jQuery!</li>
107 <script type="text/javascript">
108 var zoom_title = function (canvas) {
109 var h1 = canvas.find("h1");
110 var old_size = h1.css('font-size');
111 h1.animate({"font-size":"80pt" }, 300)
112 .animate({"font-size":old_size }, 300);
115 SWS.Presentation.registerCallback(3, zoom_title);
119 <div class="sws-slide">
120 <h1>What's wrong with Beamer/L<sub>A</sub>T<sup>E</sup>X/Tikz?</h1>
122 <li class="sws-pause">Does not easily support smooth
124 <li class="sws-pause">Hard to program/script </li>
125 <li class="sws-pause">Using modern fonts and UTF-8 is a nightmare</li>
126 <li class="sws-pause">Slow compilation times</li>
127 <li class="sws-pause">Difficult to integrate several media
128 (videos, vector graphics, sounds,…)
131 <p class="sws-pause">But wait! I'm loosing all those nicely
132 rendered mathematical formulæ!</p>
133 <p class="sws-pause"> You mean like this one<sup>*</sup> ?
135 F_n = \frac{1}{\sqrt{5}}\cdot\left(\frac{1+\sqrt{5}}{2}\right)^n-\frac{1}{\sqrt{5}}\cdot\left(\frac{1-\sqrt{5}}{2}\right)^n
138 <p class="sws-pause">or that one<sup>*</sup> ?
141 \frac{\Gamma\cup\{x\mapsto t\}\vdash e : s}{\Gamma\vdash \lambda x^{t}.e : t \rightarrow s}
144 <p class="sws-pause">*: All this is done
145 using <a href="http://www.mathjax.org">MathJax!</a> and
146 written like this:<br/>
149 \Gamma\cup\{x\mapsto t\}\vdash e : s
151 \Gamma\vdash \lambda x^{t}.e : t \rightarrow s
156 <div class="sws-slide">
157 <h1>A simple example</h1>
158 <p class="sws-onframe-1_3">
159 A minimal slide, with no animation looks like this:
161 <div <em>class="sws-slide"</em>>
162 <h1>Slide title</h1>
167 <p class="sws-pause">
168 You can also reveal things progressively like this:
170 <p> Text 1</p>
171 <p <em>class="sws-pause"</em>>
172 Text 2 (appears afterwards)
176 <p class="sws-pause">
177 You can also set an element to appear on specific frames:
179 <p> Text 1</p>
180 <p <em>class="sws-onframe-1-5_9"</em>>
181 Appears on frame 2, 3, 4, 5, 6 and 10 of the current slide
182 (frame numbering starts at 0).
187 <div class="sws-slide">
188 <h1>Scripting your presentation</h1>
190 Of course, you can script your presentation with Javascript!<br/>
191 You just need to add the <code>script</code> element somewhere in
192 the current <code>div</code>
194 <script type="text/javascript">
195 function zoom_title (canvas) {
196 var h1 = canvas.find("h1");
197 var old_size = h1.css('font-size');
198 h1.animate({"font-size":"80pt" }, 300)
199 .animate({"font-size":old_size }, 300);
201 //Call the zoom_title function on the 4th and 7th frame
202 <em>SWS.Presentation.registerCallback("3_6", zoom_title);</em>
205 (That's not a bug, you should keep pressing next, see how many
206 steps there are on this slide)
209 <script type="text/javascript">
210 SWS.Presentation.registerCallback("4_7", zoom_title);
214 <div class="sws-slide">
216 You can manipulate the presentation through
217 the <em><code>SWS.Presentation</code></em> object. For instance:
219 <a onclick="SWS.Presentation.previous();">◀◀◀◀◀</a>
220 <a onclick="SWS.Presentation.next();">▶▶▶▶▶</a>
221 <a onclick="SWS.Presentation.goToSlide(1,2);">Go back in time!</a>
224 <a onclick="SWS.Presentation.previous();SWS.Presentation.refresh();">◀◀◀◀◀</a>
225 <a onclick="SWS.Presentation.next();SWS.Presentation.refresh();">▶▶▶▶▶</a>
226 <a onclick="SWS.Presentation.goToSlide(1,2);">Go
227 back in time!</a> (to the second frame of the first slide)
229 <div class="sws-slide">
230 <h1>Some more fancy stuff</h1>
231 Let's put some <em>inline</em> SVG:
232 <div style="text-align:center;">
234 xmlns:dc="http://purl.org/dc/elements/1.1/"
235 xmlns:cc="http://creativecommons.org/ns#"
236 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
237 xmlns:svg="http://www.w3.org/2000/svg"
238 xmlns="http://www.w3.org/2000/svg"
239 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
240 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
245 inkscape:version="0.48.3.1 r9886"
246 sodipodi:docname="lights.svg">
252 bordercolor="#666666"
254 inkscape:pageopacity="0.0"
255 inkscape:pageshadow="2"
257 inkscape:cx="38.9935"
258 inkscape:cy="56.441072"
259 inkscape:document-units="px"
260 inkscape:current-layer="layer1"
265 fit-margin-bottom="0"
266 inkscape:window-width="1627"
267 inkscape:window-height="1026"
268 inkscape:window-x="1077"
269 inkscape:window-y="24"
270 inkscape:window-maximized="1">
277 snapvisiblegridlinesonly="true"
278 originx="-82.348214px"
279 originy="-877.32807px" />
280 </sodipodi:namedview>
286 <dc:format>image/svg+xml</dc:format>
288 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
294 inkscape:label="Layer 1"
295 inkscape:groupmode="layer"
297 transform="translate(-82.348214,-4.6814313)">
300 transform="matrix(1.5714286,0,0,1.5714286,-48.571431,-4.2069617)">
308 style="fill:#000a1a;fill-opacity:1;stroke:#1b373d;stroke-width:3.3829999;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
310 transform="translate(132.5,-20)"
311 d="m -15,44.862183 c 0,6.903559 -5.596441,12.5 -12.5,12.5 -6.903559,0 -12.5,-5.596441 -12.5,-12.5 0,-6.90356 5.596441,-12.5 12.5,-12.5 6.903559,0 12.5,5.59644 12.5,12.5 z"
314 sodipodi:cy="44.862183"
317 style="fill:#000a1a;fill-opacity:1;stroke:#1b373d;stroke-width:3.3829999;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
318 sodipodi:type="arc" />
320 d="m -15,44.862183 c 0,6.903559 -5.596441,12.5 -12.5,12.5 -6.903559,0 -12.5,-5.596441 -12.5,-12.5 0,-6.90356 5.596441,-12.5 12.5,-12.5 6.903559,0 12.5,5.59644 12.5,12.5 z"
323 sodipodi:cy="44.862183"
326 style="fill:#000a1a;fill-opacity:1;stroke:#1b373d;stroke-width:3.3829999;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
328 transform="translate(132.5,15)" />
330 d="m -15,44.862183 c 0,6.903559 -5.596441,12.5 -12.5,12.5 -6.903559,0 -12.5,-5.596441 -12.5,-12.5 0,-6.90356 5.596441,-12.5 12.5,-12.5 6.903559,0 12.5,5.59644 12.5,12.5 z"
333 sodipodi:cy="44.862183"
336 style="fill:#000a1a;fill-opacity:1;stroke:#1b373d;stroke-width:3.3829999;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
338 transform="translate(132.5,50)" />
343 Of course we can animate it with some javascript!
344 <script type="text/javascript">
345 SWS.Presentation.registerCallback(0, function(o){
346 set_color(o.find("#topdisk"), "#000a1a");
348 SWS.Presentation.registerCallback(1, function(o){
349 set_color(o.find("#topdisk"), "#ff0000");
350 set_color(o.find("#middledisk"), "#000a1a");
352 SWS.Presentation.registerCallback(2, function(o){
353 set_color(o.find("#middledisk"), "#ffa500");
354 set_color(o.find("#bottomdisk"), "#000a1a");
356 SWS.Config['sws-slide-change'] = SWS.Effects.slideChangeFadeOutIn;
358 SWS.Presentation.registerCallback(3, function(o){
359 set_color(o.find("#bottomdisk"), "#00ff00");
360 SWS.Config['sws-slide-change'] = SWS.Effects.slideChangeHorizontalSlide;
365 <div class="sws-slide">
366 <h1>Totally customizable</h1>
368 BTW did you see how I changed the transition effect for the