Tweak style
This commit is contained in:
@@ -3,12 +3,21 @@
|
||||
{% block title %}{{ 'posts'|trans }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if app.user %}
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end mb-2">
|
||||
<a href="{{ path('app_post_new') }}" class="btn btn-primary">{{ 'create_new_post'|trans }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="grid-4">
|
||||
{% for post in posts.iterator %}
|
||||
<div class="card">
|
||||
{% if post.image %}
|
||||
<img src="{{ app.request.baseUrl }}{{ vich_uploader_asset(post, 'imageFile') }}" class="card-img-top" alt="">
|
||||
{% endif %}
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><a href="{{ path('app_post_show', {id: post.id}) }}">{{ post.species ? post.species.vernacularName : 'post_undefined'|trans }}</a></h5>
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ post.foundDate | date("d/m/Y \\à H \\h") }}</h6>
|
||||
<p class="card-subtitle mb-2 text-muted">{{ post.latitude }}, {{ post.longitude }}, {{ post.altitude }}m</p>
|
||||
<p class="card-subtitle mb-2 text-muted">{{ post.latitude ?? 0 }}, {{ post.longitude ?? 0 }}, {{ post.altitude ?? 0 }}m</p>
|
||||
<p class="card-text">{{ post.commentary }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
@@ -27,6 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% include '_pagination.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user