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

Use Table for Reveal.js config object #33

Open
HugoGranstrom opened this issue Jun 29, 2023 · 1 comment
Open

Use Table for Reveal.js config object #33

HugoGranstrom opened this issue Jun 29, 2023 · 1 comment

Comments

@HugoGranstrom
Copy link
Owner

Reveal.js has a wide range of configuration and supporting them all in nimiSlides is tedious work. Instead we will have a Table[string, string] which will represent the key-value pairs in the object. Then custom templates like disableVerticalCentering can modify this table instead of having to hard-code it into the main partial. It would then be implemented something like this:

template disableVerticalCentering() =
  nb.setConfig("center", "false")

A setConfig, getConfig should be the main API used to not make the code dependent on the current mustache backend.

With this, users can modify all the settings themselves without having to extend nimiSlides with all the options manually.

@HugoGranstrom
Copy link
Owner Author

Upon further inspection it seems like mustache doesn't support rendering tables the way I thought (looping over them), so instead it will have to be a seq[Table[string, string]] where we have to specify the key and value for each parameter as its own Table.

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

No branches or pull requests

1 participant