Login  Register

Re: Why menu, status or go options of deck.js does not work with HTML generated

Posted by ch007m on Nov 19, 2013; 10:09am
URL: https://discuss.asciidoctor.org/Why-menu-status-or-go-options-of-deck-js-does-not-work-with-HTML-generated-tp1011p1018.html

I think that I know the reason. This is because the deck.js backend (https://github.com/asciidoctor/asciidoctor-backends/blob/master/haml/deckjs/document.html.haml) does not add the following lines to be able to use the options (g = goto, m = menu, b = blank page, t=table of contents)

What we generate today -->
#
<script src="deck.js/jquery-1.7.2.min.js"></script><script src="deck.js/core/deck.core.js"></script><script src="deck.js/core/deck.core.js"></script><script src="deck.js/extensions/hash/deck.hash.js"></script><script src="deck.js/extensions/menu/deck.menu.js"></script><script src="deck.js/extensions/goto/deck.goto.js"></script><script src="deck.js/extensions/status/deck.status.js"></script><script src="deck.js/extensions/navigation/deck.navigation.js"></script><script src="deck.js/extensions/scale/deck.scale.js"></script><script> $(function() { $.deck('.slide'); }); </script>
but should be -->



<p class="deck-status">
       
        /
       
</p>
<div class="deck-toc"></div>
<form action="." method="get" class="goto-form">
        <label for="goto-slide">Go to slide:</label>
        <input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
        <datalist id="goto-datalist"></datalist>
        <input type="submit" value="Go">
</form>
#


<script> (function($, deck, undefined) { $.deck.defaults.keys["previous"] = [8, 33, 37, 39]; $.deck.defaults.keys["next"] = [13, 32, 34, 39]; $.extend(true, $[deck].defaults, { countNested: false }); $.deck('.slide'); })(jQuery, 'deck'); </script>
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist
Twitter : @cmoulliard