Closed xsuchy closed 4 years ago
I'm not sure if this would work if there is no start_align
entry in sitetext.yml
. Correct me if I'm wrong 👍 . This would be fixed by adding a default liquid tag | default:
. Also if the user specifies something like the following:
align: right align: left align: left align: left align: right
Does your addition produce the desired alignment?
If there is no start_align
then the first
if align == "right"
will be False and it will be aligned to left. At the end of the else
branch will be assigned "right" to "align" and the next iteration will be right-aligned. So left->right. And yes, I tried that.
If the user manually specifies align
then it will be honored.
E.g.
align: right align: left align: left align: left align: right
will be honored. And
align: right align: left align: left //# one item with omited align align: right
will produce
right left left right right
Got it, thanks for clarifying!
You can define:
timeline: start_align: "right"
and then the timeline starts aligned to right and then continue switching. The default is: start_align: "left"
You can always enforce the order by:
which will enforce the alignment to the right and the next one will continue on left.