Open vaughany opened 12 years ago
Hi, I'm not sure to understand you well, which example/index.html are you talking about? can you copy and past it here so that I can see the problem. Best, Rémi
Hi Rémi.
Sorry for the confusion. I meant "introduction", not "example". The file I am referring to is part of the deck.js distribution which I added deck.ext.js to:
https://github.com/imakewebthings/deck.js/blob/master/introduction/index.html
Ok, well the deck.toc.js extension currently only supports one <h*> per slide, therefore in the following only the h2 will be displayed...
<section class="slide" id="how-to-overview">
<h2>How to Make a Deck</h2>
<ol>
<li>
<h3>Write Slides</h3>
<p>Slide content is simple HTML.</p>
</li>
<li>
<h3>Choose Themes</h3>
<p>One for slide styles and one for deck transitions.</p>
</li>
<li>
<h3>Include Extensions</h3>
<p>Add extra functionality to your deck, or leave it stripped down.</p>
</li>
</ol>
</section>
Hi Rémi :), I think I experimented with the toc with only h2 and it was not working. I have a custom experimental branch where I had this fix to make it work:
@@ -217,7 +217,12 @@ This module provides a support for TOC to the deck. /* insert it at the right place */ var $target = this.root; if( depth > 1) { - $target = ($target.find("li#toc-"+($c.slice(0,$c.length-1).join('-')))).children("ul"); + $target = $target.find("li#toc-"+($c.slice(0,$c.length-1).join('-'))); + if( $target.length > 0 ) { + $target = $target.children("ul"); + } else { + $target = this.root; + } } $tocElm.appendTo($target); };
I did not really dig more but I remember it kind of fixes the problem.
Rémi @twitwi
I've just installed deck.toc.js into the default example/index.html file, and noticed that while it works well, it's not reading all the
tags on the #how-to-overview slide.
I should see:
...but all I am seeing in the ToC pop-up is: