<div class="parallax-header slider" style="height: 200px;">
  <%= render partial: 'content/display/favorite_control', locals: { content: @content } %>

  <ul class="slides">
    <% image_uploads = @content.image_uploads.map { |image| image.src.url(:large) } %>
    <% image_uploads = ["card-headers/#{@content.class.name.downcase.pluralize}.jpg"] if image_uploads.empty? %>

    <% image_uploads.each do |image_source| %>
      <li>
        <%= image_tag image_source %>
        <div class="caption bordered-text center">
          <h3>
            <% if @content.persisted? %>
              <%= simple_format ContentFormatterService.show(
                text: @content.name_field_value,
                viewing_user: current_user
              ) %>
              <small>
                <%= simple_format ContentFormatterService.show(
                  text: @content.description,
                  viewing_user: current_user
                ) %>
              </small>
            <% else %>
              New <%= @content.class.name %>
            <% end %>
          </h3>
        </div>
      </li>
    <% end %>
  </ul>
</div>
