prez
prez copied to clipboard
Per-directory data-* attributes
I'm not sure whether this is just a question or a feature request, but here it is: We've got training material at http://ants.builders/training/#/ that I've been working on converting to prez ( https://github.com/anthill/training/pull/9 ). Among other things, for each "section", we use a different color. The only way I've been able to implement this was by copy/pasting the color on every slide.
- https://github.com/anthill/training/pull/9/files#diff-4c66c0462a3eae6b52261a08cc843e0eR1
- https://github.com/anthill/training/pull/9/files#diff-8c2c0fd2d07835adb555dd2d360d296aR1
- https://github.com/anthill/training/pull/9/files#diff-4ff8d55fecfb85b86d663817a6a7a340R1
- etc.
Is there a way to provide data attributes per-(slide-directory)?
Thinking about ways to achieve this with @Delapouite we've come to these options:
- A file in chapter's directory, dot or no dot, like
.prez
orattributes.txt
-
A file in project's root → no because it would become a pain to rename a chapter -
Data-attributes in chapter's first slide → no because it would become a pain to move this slide - A way to achieve this with CSS: @Delapouite recently added a class/id to chapter's
<section>
, and we could easily add a class to<body>
reflecting current chapter/slide, so it can be targeted with css
I think we'll go both ways ;) Your opinion on file name?