Reveal.js by default likes to center everything but when for example making lists it can cause trouble if each list element is created separately as they aren't aligned horizontally. In that case, one could left-align them for example. So the idea is to introduce align which just wraps it's content in a div with align properties:
The top three elements are without any alignment and the bottom three are left-aligned.
A simple implementation would be:
template align*(text: string, body: untyped) =
nbRawOutput: """
<div style="text-align: $1;">
""" % text
body
nbRawOutput: "</div>"
It only aligns text but I think that is enough to support out of the box for now. In the future a convenient flexbox API (in nimib?) would allow for more customization of layout.
Reveal.js by default likes to center everything but when for example making lists it can cause trouble if each list element is created separately as they aren't aligned horizontally. In that case, one could left-align them for example. So the idea is to introduce
align
which just wraps it's content in a div with align properties:The top three elements are without any alignment and the bottom three are left-aligned.
A simple implementation would be:
It only aligns text but I think that is enough to support out of the box for now. In the future a convenient flexbox API (in nimib?) would allow for more customization of layout.