Skip to content

Commit

Permalink
stack badge under photo
Browse files Browse the repository at this point in the history
  • Loading branch information
cassieemb committed Feb 28, 2025
1 parent 9a44063 commit ed7968a
Showing 1 changed file with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@
<%= link_to adopter_fosterer_fostered_pet_files_path(fostered_pet.pet, pet_id: fostered_pet.pet.id), data: { turbo_frame: "pet_files", action: "click->card#selectCard" } do %>
<div class="card h-100 bg-white border-0 shadow-sm" data-card-target="card">
<div class="card-body d-flex flex-wrap flex-column flex-lg-row align-items-center justify-content-between gap-2">
<div class="d-flex align-items-center flex-shrink-0" style="width: 50px; height: 50px;">
<%= image_tag(
fostered_pet.pet.images.attached? ? fostered_pet.pet.images.first : 'coming_soon.jpg',
class: 'rounded-circle',
style: "width: 100%; height: 100%; object-fit: cover;"
) %>
<div class="d-flex flex-column align-items-center flex-shrink-0">
<div style="width: 50px; height: 50px;">
<%= image_tag(
fostered_pet.pet.images.attached? ? fostered_pet.pet.images.first : 'coming_soon.jpg',
class: 'rounded-circle',
style: "width: 100%; height: 100%; object-fit: cover;"
) %>
</div>
<div class="badge mt-2 <%= status_classes(fostered_pet.status) %>">
<%= fostered_pet.status.to_s.titleize %>
</div>
</div>
<h4 class="card-title mb-0 flex-grow-1 text-center">

<h3 class="card-title mb-0 flex-grow-1 text-center">
<%= fostered_pet.pet.name %>
</h4>
</h3>
<div class="fostered-dates d-flex flex-column text-start">
<div class="badge mb-2 <%= status_classes(fostered_pet.status) %>">
<%= fostered_pet.status.to_s.titleize %>
</div>
<h5 class="mb-1">Start: <%= fostered_pet.start_date.strftime("%m/%d/%y") %></h5>
<h5 class="mb-0">End: <%= fostered_pet.end_date.strftime("%m/%d/%y") %></h5>
<h5 class="mt-1">End: <%= fostered_pet.end_date.strftime("%m/%d/%y") %></h5>
</div>
</div>
</div>
Expand Down

0 comments on commit ed7968a

Please sign in to comment.