use bootstrap card to display offerings

This commit is contained in:
jannisp 2021-04-26 18:54:00 +02:00
parent fa734d7350
commit 811056d901

View file

@ -1,17 +1,24 @@
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block body %} {% block body %}
{% if offerings|length > 0 %}
{% for offering in offerings %}
{% if offering.photoFilename %}
<img src="{{ asset('uploads/photos/' ~ offering.photofilename) }}" />
{% endif %}
<h4>{{ offering.title }}</h4> <h1>Offerings</h1>
<small> {% if offerings|length > 0 %}
{{ offering.createdAt|format_datetime('medium', 'short') }} <div class="card-deck">
</small> {% for offering in offerings %}
{% endfor %} <a href="#">
<div class="card" style="width: 20rem;">
{% if offering.photoFilename %}
<img class="card-img-top" src="{{ asset('uploads/photos/' ~ offering.photofilename) }}" />
{% endif %}
<div class="card-body">
<h5 class="card-title">{{ offering.title }}</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
</div>
</div>
</a>
{% endfor %}
</div>
{% else %} {% else %}
<p>There are currently no active listings</p> <p>There are currently no active listings</p>
{% endif %} {% endif %}