Style pagination with Bootstrap
This commit is contained in:
@@ -2,35 +2,19 @@
|
||||
{% block title %}Posts!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
</head>
|
||||
</html>
|
||||
<a href="/species/add" class="btn btn-primary">Ajouter une espèce</a>
|
||||
<a href="/post/add" class="btn btn-primary">Ajouter un post</a>
|
||||
|
||||
{% for post in posts.iterator %}
|
||||
<div class="card" style="width: 42rem; margin: 20px 0 50px 100px;">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">User</h5>
|
||||
<h5 class="card-title">{{ post.species ? post.species.vernacularName : 'Post' }}</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-text">{{ post.commentary }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a class="fa fa-heart">28</a>
|
||||
<a class="fa fa-comment">128</a>
|
||||
28 ❤️
|
||||
128 💬
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if posts.count > maxPosts %}
|
||||
<a class="btn btn-primary" href="/?page={{currentPage+1}}" id="load-more" style="margin: 20px 0 50px 100px;">Load More</a>
|
||||
{% endif %}
|
||||
|
||||
{% include '_pagination.html.twig' %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user