diff options
author | Christian Franke <nobody@nowhere.ws> | 2013-04-09 14:31:22 +0200 |
---|---|---|
committer | Christian Franke <nobody@nowhere.ws> | 2013-04-09 14:31:22 +0200 |
commit | 5a774ef6f3b38b19b26913a34b1388530c72334e (patch) | |
tree | 543127427771d75f652fc9e726cc39aa1a72571c /deck.js/samples/deck-clone.html |
Initial Commit
Diffstat (limited to 'deck.js/samples/deck-clone.html')
-rw-r--r-- | deck.js/samples/deck-clone.html | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/deck.js/samples/deck-clone.html b/deck.js/samples/deck-clone.html new file mode 100644 index 0000000..e4b77a2 --- /dev/null +++ b/deck.js/samples/deck-clone.html @@ -0,0 +1,195 @@ +<!DOCTYPE html> +<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]--> +<!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]--> +<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + + <title>deck.clone.js test/demo</title> + + <meta name="description" content="deck.*.js"> + <meta name="author" content="Rémi Emonet"> + <!--meta name="viewport" content="width=1024, user-scalable=no"/--> + + <!-- Core and extension CSS files --> + <link rel="stylesheet" href="../core/deck.core.css"> + <link rel="stylesheet" href="../extensions/status/deck.status.css"> + <link rel="stylesheet" href="../extensions/hash/deck.hash.css"> + + <!-- Style theme. More available in /themes/style/ or create your own. --> + <link rel="stylesheet" href="../themes/style/neon.css"> + + <!-- Transition theme. More available in /themes/transition/ or create your own. --> + <!--link rel="stylesheet" href="../themes/transition/horizontal-slide.css"--> + + <script src="../modernizr.custom.js"></script> + + <!-- Grab CDN jQuery, with a protocol relative URL; fall back to local if offline --> + <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script> + <script>window.jQuery || document.write('<script src="../jquery-1.7.2.min.js"><\/script>')</script> + + <!-- Deck Core and extensions --> + <script src="../core/deck.core.js"></script> + <script src="../extensions/hash/deck.hash.js"></script> + <script src="../extensions/status/deck.status.js"></script> + <script src="../extensions/fit/deck.fit.js"></script> + <link rel="stylesheet" href="../extensions/fit/deck.fit-fs.css"> + <script src="../extensions/step/deck.step.js"></script> + + <script src="../extensions/clone/deck.clone.js"></script> + + + <style type="text/css"> + body.has-clones .deck-container {background: grey;} + .deck-container>.slide {border: 1px dashed #333;} /* for the demo */ + .slide h1 {font-size: 3em;} + .slide h1 b {color: #0F0;} + .slide h1 em, .slide .smallcomment {color: #445; text-shadow: none; font-size: .3em;} + .slide .smallcomment {font-size: .6em;} + </style> + </head> + +<!-- for the demo, the body is not the container so it can be resized by the user --> +<body> + +This page surely has a purpose.<br/> +Use left/right arrow keys to browse the presentation.<br/> + +<!-- for the demo, a resizeable wrapper around the container --> +<div class="deck-container"> + +<!-- Begin slides --> +<section class="slide" id="title-slide"> + <h1 title="use arrow keys to navigate">Getting started with deck.js:<br/><b>clone</b> extension + <br/><em>use right arrow to move on</em> + </h1> +</section> + +<section class="slide"> + <h2>“clone”: What?</h2> + <ul> + <li>Duplicate your window</li> + <li>Forwards events to all clones</li> + <li>Replicates mouse pointer</li> + <li>Usage + <ul> + <li>put a second view on a second screen</li> + <li>view next slide on your view (theme)</li> + <li>view notes on your view (extension)</li> + </ul> + </li> + </ul> +</section> + +<section class="slide"> + <h2>“clone”: let's get cloned</h2> + <div class="firefox-message" style="position: absolute; border: 2px solid red; background: #181818; padding: 1em; margin: 1em; font-size: .8em; margin-top: 0;"> + With firefox and "file://..." URLs (local files), the popup might be blocked, refusing to be shown. + To fix that: + <ul> + <li>on the bar that pops up, click on Preferences>Edit Pop-Up Blocker Preferences…</li> + <li>type “<file>” (without the quotes, with the brackets)</li> + <li>click allow</li> + <li>click close</li> + <li>close the poped-up bar and hit 'c' again</li> + </ul> + </div> + <ul> + <li>Clone your view! + <ul> + <li>NB: the browser will probably open a new tab</li> + <li>clone your view by typing 'c' + <br/><span class="smallcomment">(in local, show how to <a class="show-firefox-message">tell firefox to not block the popup</a>)</span> + </li> + <li>detach your tab (drag it out of the browser)</li> + <li>go to the main view and hit the right arrow</li> + </ul> + </li> + </ul> +</section> +<script> +$(function() { + $('.firefox-message').hide(); + $('.firefox-message').click(function(){ + $('.firefox-message').hide(300); + }); + $('.show-firefox-message').click(function(){ + $('.firefox-message').fadeIn(500); + }); +}); +</script> + +<section class="slide"> + <h2>“clone”: Propagation</h2> + <ul> + <li class="slide">Slide events are propagated to clone(s) + <ul> + <li class="slide">from master to clone(s)</li> + <li class="slide">try left/right arrows</li> + <li class="slide">try up arrow (with the “<a href="deck-step.html">step</a>” extension)</li> + </ul> + </li> + <li class="slide">Mouse pointer is replicated + <ul> + <li class="slide">try to move your mouse (on the master)</li> + <li class="slide">custom style using HTML+CSS</li> + <li class="slide">examples: red box, centered green box, …</li> + </ul> + </li> + </ul> +</section> + +<section class="slide"> + <h2>“clone”: Styling</h2> + <ul> + <li class="slide">Master view styling + <ul> + <li>adds the “has-clones” class when cloned</li> + <li>in this deck: gray background</li> + <li>allow for a presenter view (next slide, notes, …)</li> + </ul> + </li> + </ul> +</section> + +<section class="slide"> + <h2>Browser support</h2> + <ul> + <li>Should be ok</li> + </ul> +</section> +<!-- DEMO: clone --> + +<!-- deck.navigation snippet --> +<!--a href="#" class="deck-prev-link" title="Previous">←</a> +<a href="#" class="deck-next-link" title="Next">→</a--> + +<!-- deck.status snippet --> +<!--p class="deck-status"> + <span class="deck-status-current"></span> + / + <span class="deck-status-total"></span> +</p--> + +<!-- deck.clone snippet: simple red box with top-left corner as cursor position --> +<div class="clonepointer" style="position:absolute; width:20px; height:20px; background-color:red; z-index:10"></div> +<!-- deck.clone snippet: simple green box with center as cursor position --> +<div class="clonepointer" style="position:absolute; z-index:11"><div style="margin: -13px 0 0 -13px; width:18px; height:18px; border:4px solid green;"></div></div> + +<!-- deck.hash snippet --> +<a href="." title="Permalink to this slide" class="deck-permalink">#</a> + +<!-- Initialize the deck --> +<script> +$(function() { + $.deck('.slide', { + // fitMarginX:100, fitMarginY:100, + // fitMode: "stretched" //"center middle" //"bottom right" //"top left" + }); +}); +</script> +</div> +</body> +</html> |