Rich Media Text Blocks
A RichTextBlock
element that serves the functionality and structure laid out in libget#2.
Specifically, the logic could be as follows:
- Set
offset
to 0 - For each element in the content array:
- Check the type of the element, render at
offset
:- banner or text: just render them at full width
- left or right image: render the image/text at 50% width at the appropriate side
- Get the height (or max height if it's image+text) of the just-rendered element
- Use that height add to
offset
, and adjust the rendering of the next element
- Check the type of the element, render at
This type of logic should allow a "feels just like css+html" while reading, without actually digging into any of the complexities. ("we have css/html at home")
Even though it's being designed from the other end in that issue, really Chesto should dictate what the fields in this json object look like, as well as allowing itself to have json parsing support.
JSON parsing would be the second dependency that libget and chesto share then without being related themselves (the other is curl). It's possible that we may need a common library for the inter-dependencies and common functions.