X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=doc%2Fdemo.xhtml;h=472982b3a10b72bc679d32deee348d654a102921;hb=3c70fc13da0c911d97e8712343b6dfaffd42588f;hp=e64a8465d617c2a0ca41a4cf46b71678530f2789;hpb=f55977d9f090ee6bbace278733377ff50b7bec3a;p=hacks%2FsimpleWebSlides.git diff --git a/doc/demo.xhtml b/doc/demo.xhtml index e64a846..472982b 100644 --- a/doc/demo.xhtml +++ b/doc/demo.xhtml @@ -2,50 +2,82 @@ - + SimpleWebSlides - + + + + + + - - - - + + - - - - SWS.Presentation.setTemplate('sws-template-slide-activate', function (o, k) { - o.animate({ 'opacity': '1.0', 'top':'0pt'}, function () { k(o) }); - }); + - SWS.Presentation.setTemplate('sws-template-frame-deactivate', function (o, k) { - o.fadeOut(250, function () { k(o)}); - }); + + + @@ -53,13 +85,13 @@

SimpleWebSlides

An HTML5 + src="HTML5_Badge.svg" alt="5"/> Presentation framework

kim@nguyen.vg
- +

Introduction

@@ -68,19 +100,276 @@ you to build funky presentations: +
+ +
+

What's wrong with Beamer/LATEX/Tikz?

+ +

But wait! I'm loosing all those nicely + rendered mathematical formulæ!

+

You mean like this one* ? + $$ + 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 + $$ +

+

or that one* ? + + $$ + \frac{\Gamma\cup\{x\mapsto t\}\vdash e : s}{\Gamma\vdash \lambda x^{t}.e : t \rightarrow s} + $$ +

+

*: All this is done + using MathJax! and + written like this:
+


+    \frac{
+          \Gamma\cup\{x\mapsto t\}\vdash e : s
+    }{
+          \Gamma\vdash \lambda x^{t}.e : t \rightarrow s
+    }
+
+

+
+

A simple example

+

+ A minimal slide, with no animation looks like this: +


+     <div class="sws-slide">
+          <h1>Slide title</h1>
+             Hello world!
+     </div>
+
+

+

+ You can also reveal things progressively like this: +


+      <p> Text 1</p>
+      <p class="sws-pause">
+      Text 2 (appears afterwards)
+      </p>
+  
+

+

+ You can also set an element to appear on specific frames: +


+      <p> Text 1</p>
+      <p class="sws-onframe-1-5_9">
+      Appears on frame 2, 3, 4, 5, 6 and 10 of the current slide
+      (frame numbering starts at 0).
+      </p>
+  
+

+
+
+

Scripting your presentation

+

+ Of course, you can script your presentation with Javascript!
+ You just need to add the script element somewhere in + the current div +


+<script type="text/javascript">
+    function zoom_title (canvas) {
+        var h1 = canvas.find("h1");
+        var old_size = h1.css('font-size');
+            h1.animate({"font-size":"80pt" }, 300)
+               .animate({"font-size":old_size }, 300);
+    };
+    //Call the zoom_title function on the 4th and 7th frame
+    SWS.Presentation.registerCallback("3_6", zoom_title);
+<script>
+
+ (That's not a bug, you should keep pressing next, see how many + steps there are on this slide) +

+ + + +
+
+

SWS API

+ You can manipulate the presentation through + the SWS.Presentation object. For instance: +
+      <a onclick="SWS.Presentation.previous();">◀◀◀◀◀</a>
+      <a onclick="SWS.Presentation.next();">▶▶▶▶▶</a>
+      <a onclick="SWS.Presentation.goToSlide(1,2);">Go back in time!</a>
+
+ Let's try it: + ◀◀◀◀◀ + ▶▶▶▶▶ + Go + back in time! (to the second frame of the first slide) +
+
+

Some more fancy stuff

+Let's put some inline SVG: +
+ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + +
+Of course we can animate it with some javascript! + +
+
+

Totally customizable

+

+ BTW did you see how I changed the transition effect for the + previous slide ? +

+