app/views/badges/_badge.html.erb
<div class="col">
<div class="card text-bg-light mb-3 border-primary border-opacity-25 shadow h-100">
<div class="row g-0">
<div class="col-sm-4 p-3 d-flex justify-content-center align-items-start">
<%= image_tag badge.image.variant(:web), class: 'img-badge', alt: badge.name, loading: 'lazy' %>
</div>
<div class="col-sm-8">
<div class="card-body">
<h5 class="card-title text-uppercase"><%= badge.name %></h5>
<p class="card-text">
<%= link_to sanitized_text(badge.conditions), badge, class: 'stretched-link text-decoration-none text-body' %>
</p>
<% if badge.received_date %>
<p class="card-text"><small class="text-muted">Дата получения: <%= l badge.received_date %> года</small></p>
<% end %>
</div>
</div>
</div>
</div>
</div>