Fix layout
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build was killed
continuous-integration/drone/pr Build is failing

This commit is contained in:
Jannis Portmann 2023-09-10 11:53:20 +02:00
parent a95af0e48f
commit a2d37538dc

View file

@ -20,22 +20,24 @@
<h2 class="h3">{% trans "Offers" %}</h2> <h2 class="h3">{% trans "Offers" %}</h2>
</div> </div>
{% if offers %} {% if offers %}
<div class="card-deck d-flex justify-content-around justify-content-sm-around justify-content-md-between flex-wrap"> <div class="row row-cols-1 row-cols-md-2 row-cols-xl-3 mt-3 mb-3 row-gap-5">
{% for offer in offers %} {% for offer in offers %}
<div class="col"> <div class="col">
<div class="card h-100 p-0 flex-column justify-content-between"> <div class="card h-100 p-0">
<a href="{% url 'offer_detail' offer.id %}"> <a href="{% url 'offer_detail' offer.id %}">
{% if offer.image %} {% if offer.image %}
<img class="card-img-top offer-img" src="{{ offer.image.url }}"/> <img class="card-img-top offer-img" src="{{ offer.image.url }}" />
{% else %} {% else %}
<img class="card-img-top offer-img" src="{% static 'placeholder.jpg' %}" /> <img class="card-img-top offer-img" src="{% static 'placeholder.jpg' %}" />
{% endif %} {% endif %}
<div class="card-body"> <div class="card-body">
<h5 class="h5">{{ offer.title }}</h5> <h5 class="h5">
{{ offer.title }}<span class="ms-2 badge pfl-{{ offer.category|lower }}">{{ offer.get_category_display }}</span>
</h5>
</div> </div>
</a> </a>
<div class="card-footer d-flex justify-content-between"> <div class="card-footer d-flex justify-content-between">
<a href="#"> <a href="{% url 'user_detail' offer.user.id %}">
<i class="fas fa-user mt-3"></i> {{ offer.user.username }} <i class="fas fa-user mt-3"></i> {{ offer.user.username }}
</a> </a>
<p class="zip"> <p class="zip">