Two types of blocks (Alternately)

I’d actually solve this with CSS only, using the order property of flexbox, depending on whether or not the item is even or odd.

If you really want two different markups, create two snippets and call them alternating, if index is odd, snippet one, if index is even, snippet two.

1 Like