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' %}
{% 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>
<small>
{{ offering.createdAt|format_datetime('medium', 'short') }}
</small>
<h1>Offerings</h1>
{% if offerings|length > 0 %}
<div class="card-deck">
{% for offering in offerings %}
<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 %}
<p>There are currently no active listings</p>
{% endif %}