HugoGranstrom / nimiSlides

A Reveal.js theme for nimib for making slideshow presentations in Nim
https://hugogranstrom.com/nimiSlides
MIT License
78 stars 5 forks source link

Animate markdown code #15

Open HugoGranstrom opened 1 year ago

HugoGranstrom commented 1 year ago

This is an idea by @srozb.

Now that nimib has support for highlighting all kinds of languages in markdown, it would be nice if we could animate them as well like animateCode. The API would be the same but accept a language and a string instead of a code block:

animateMdCode("css", 1..2, 3, 4..5): """
.reveal img {
  max-height: 95vh;
}
"""

This should share the same internal machinery as animateCode, with the only exception being that the code is given directly instead of read from source.