{% extends 'django-blogs/base.html' %}

{% block content %}

{% for post in posts %}
<a class="text-dark" href="{% url 'blogs:edit' post.uuid %}" style="text-decoration: none">
    <div class="card">
        <div class="card-body">
            <h4 class="card-title"><strong>{{ post.heading | safe}}</strong></h4>
        </div>
    </div>
</a>
{% endfor %}

<div class="mt-2">
    <ul class="pagination justify-content-center pagination-sm">
        {% if posts.has_previous %}
            <li class="page-item">
                <a class="page-link" href="?page={{ posts.previous_page_number }}">previous</a>
            </li>
        {% endif %}

        {% if posts.has_next %}
        <li class="page-item">
            <a class="page-link" href="?page={{ posts.next_page_number }}">next</a>
        </li>
        {% endif %}
    </ul>
</div>

{% endblock %}