<% @collection = @article.collection %>
<% if @collection.present? && @collection.articles.published.size > 1 %>
  <div class="article-collection-wrapper article-collection-wrapper-<%= position %>">
    <% if @collection.slug.present? %>
      <p>Part of "<%= @collection.slug %>" series</p>
    <% else %>
      <p>Part of a series</p>
    <% end %>
    <div class="article-collection">
      <% @collection.articles.published.order("published_at ASC").each_with_index do |article, i| %>
        <a
          href="<%= article.path if article.published %>"
          class="<%= collection_link_class(@article, article) %>"
          data-preload-image="<%= cloud_cover_url(article.main_image) %>"
          title="Part <%= i + 1 %>: <%= article.title %>">
        </a>
      <% end %>
    </div>
  </div>
<% end %>
