jdan / cleaver

30-second slideshows for hackers
http://jdan.github.io/cleaver
MIT License
4.02k stars 305 forks source link

Pass options to slide template rendering #178

Open tkers opened 5 years ago

tkers commented 5 years ago

This passes the options down to the slide template, so it's easier to extend it with new (customisable) functionality. Right now only the layout has access to the options, limiting where you can place new elements.

Additionally made sure that the default values for options.controls and options.progress are properly passed down (i.e. true when not defined explicitly) to layout as well.

It might make sense to remove the passing down of controls and progress to the slide template as well, but I figured leaving it in is a bit better for backwards-compatibility.