create a public user page
This commit is contained in:
parent
e0ec9807a3
commit
428baa749c
6 changed files with 92 additions and 43 deletions
|
@ -12,21 +12,27 @@
|
|||
{% if offers|length > 0 %}
|
||||
<div class="card-deck d-flex justify-content-around justify-content-sm-around justify-content-md-between flex-wrap">
|
||||
{% for offer in offers %}
|
||||
<a href="{{ path('show_offer', {'id': offer.id}) }}" class="mb-5">
|
||||
<div class="mb-5">
|
||||
<div class="card offer h-100">
|
||||
{% if offer.photoFilename %}
|
||||
<img class="card-img-top" src="{{ asset('uploads/photos/' ~ offer.photofilename) }}" />
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ offer.title }}</h5>
|
||||
<p class="card-text">{{ offer.description }}</p>
|
||||
</div>
|
||||
<a href="{{ path('show_offer', {'id': offer.id }) }}">
|
||||
{% if offer.photoFilename %}
|
||||
<img class="card-img-top offer-img" src="{{ asset('uploads/photos/' ~ offer.photofilename) }}" />
|
||||
{% else %}
|
||||
<img class="card-img-top offer-img" src="{{ asset('placeholder.jpg') }}" />
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ offer.title }}</h5>
|
||||
<p class="card-text">{{ offer.description }}</p>
|
||||
</div>
|
||||
</a>
|
||||
<div class="card-footer offer-footer">
|
||||
<p class="username"><i class="fas fa-user mt-3"></i> {{ offer.byUser }}</p>
|
||||
<a class="user-link" href="{{ path('user_public', { 'id': offer.byuser.id }) }}">
|
||||
<p class="username"><i class="fas fa-user mt-3"></i> {{ offer.byUser }}</p>
|
||||
</a>
|
||||
<p class="zip"><i class="fas fa-map-marker-alt mt-3"></i> {{ offer.zipCode }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
|
|
Reference in a new issue