pflaenz.li-Symfony/templates/app/index.html.twig

35 lines
1.4 KiB
Twig
Raw Normal View History

2021-04-22 17:44:16 +02:00
{% extends 'base.html.twig' %}
{% block body %}
2021-04-26 17:31:24 +02:00
{% for message in app.flashes('success') %}
<div class="alert alert-success" role="alert">
{{ message }}
</div>
{% endfor %}
2021-05-04 22:02:06 +02:00
<h1>Offers</h1>
{% if offerings|length > 0 %}
2021-05-02 16:35:00 +02:00
<div class="card-deck d-flex justify-content-around justify-content-sm-around justify-content-md-between flex-wrap">
{% for offering in offerings %}
2021-05-01 15:33:45 +02:00
<a href="./offer/{{ offering.id }}" class="mb-5">
2021-04-26 23:50:23 +02:00
<div class="card offering h-100">
{% 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>
2021-04-26 23:50:23 +02:00
<p class="card-text">{{ offering.description }}</p>
</div>
<div class="card-footer">
<p class="username">{{ offering.byUser }}</p>
<p class="zip">{{ offering.zipCode }}</p>
</div>
</div>
</a>
{% endfor %}
</div>
2021-04-26 17:31:24 +02:00
{% else %}
2021-04-27 10:20:02 +02:00
<div class="alert alert-warning" role="alert">There are currently no active listings.</div>
2021-04-26 17:31:24 +02:00
{% endif %}
{% endblock %}