paulrouget / dzslides

DZSlides is a one-file HTML template to build slides in HTML5 and CSS3.
http://paulrouget.com/dzslides
938 stars 255 forks source link

Named intra-slideshow links #112

Open joneschrisg opened 11 years ago

joneschrisg commented 11 years ago

I'd like to be able to link slide x to slide y, where tapping a link on x will navigate me to y. One simple use case is a table of contents; I'm sure others are pretty obvious.

This is definitely possible with the current implementation: I can link to "#25.0", for example. The problem is that if I add a few slides to the beginning of my deck, all my links are broken. So I end up needing n2 work to keep my links from rotting. Not particularly appealing for a deck with more than a handful of slides.

So what I'd propose is named links, like HTML anchors and LaTeX labels. For example, create an agreed-upon <section data-label="foo"> attribute (or something) that names a synonym for that slide. And then hashchange does a synonym lookup if it doesn't understand the cursor spec. (Obviously I don't care about what happens for edge cases like data-label="1.0".) This means the named links are opt-in and don't affect existing presentations.

If this is already possible, please set me straight! ;) Otherwise I may end up adding this feature myself.

hsablonniere commented 11 years ago

Hi there.

That's a problem I had a while ago. Your proposition is interesting. If you want to contribute you are welcome. I think I'll set up a new roadmap for the end of the year and I'll definitly consider adding this kind of stuff...