Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass options to slide template rendering #178

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tkers
Copy link
Collaborator

@tkers tkers commented Dec 3, 2018

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.

@@ -1,18 +1,18 @@
{{#progress}}
{{#options.progress}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supposedly, this one would work without options as well, right? Did you update this to show people the possibility of using this or just to make something else work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct. I think it might make sense to try and make the progress and controls a bit less "magical" and a bit more like something you could write yourself (i.e. in a theme) without having to modify any of the cleaver core files.

For that reason I'd also suggest deprecating/removing the progress and options variables here (this change would be required to make that happen) at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants