Use `each_with_index` instead of hand-wrought index to loop through projects, and use a partial for the duplicated empty list items.