<% if card.image.present? %>
  <div class="card__background">
    <%= image_tag card.image.presence || "", size: 120, data: { upload_preview_target: "image" } %>
  </div>

  <%= yield %>
<% end %>

<% if card.closed? %>
  <div class="card__closed">
    <span class="card__closed-title" data-text="<%= card.closure.reason %>"><%= card.closure.reason %></span>
    <strong class="card__closed-date"><%= card.closed_at.strftime("%b %d, %Y") %></strong>
    <span class="card__closed-by-line">by <span class="card__closed-by"><%= card.closed_by.familiar_name %></span></span>
  </div>
<% end %>
