Reordering media and text elements based on even or odd index