{% extends "base.html" %}

{% block content %}

<div class="mx-auto text-center">
    <h1>Matchbook</h1>
    <ul class="list-group list-group-flush" id="matchbooklist">
        {% for u in userlist %}
        <li class="list-group-item matchbook-bg border rounded mx-auto">
            {% if u.profile_image %}
                <img src="static/uploads/{{ u.profile_image }}" class="border rounded-circle red-border">
            {% else %}
                <img src="static/uploads/default.png" class="border rounded-circle red-border">
            {% endif %}
            <p>{{ u.firstname }}</p>
            <p style="font-weight: 900;">{{ u.lastname }}</p>
            <p>{{ u.gender }} , {{ u.age }}</p>
            <p>{{ u.description }}</p>
            <form method="POST">
                <button type="submit" class="btn btn-primary" name="message_recipient" value="{{ u.id }}">Message</button>
            </form>
        </li>
        {% endfor %}
    </ul>
</div>

{% endblock %}
