This repository has been archived on 2024-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
pflaenz.li-Symfony/templates/app/index.html.twig

35 lines
1.3 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 %}
<h1>Offerings</h1>
{% if offerings|length > 0 %}
2021-04-27 13:21:00 +02:00
<div class="card-deck d-flex justify-content-around">
{% for offering in offerings %}
2021-04-27 13:21:00 +02:00
<a href="#" 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 %}