{% extends "index.html" %}
{% block body %}

<section>
    <button onclick="location.href = '{{ url_for('register') }}';" type="submit"  class="float-right btn btn-info">+ Create New Account</button>
</section>
</section>
{% for user in users %}
        <article class="media content-section">
                <img class="rounded-circle article-img" src="{{ url_for('static', filename='profile_pic/' + user.profile_image)}}">
                <div class="media-body">
                    <div class="article-metadata">
                        <a class="mr-2" href="{{ url_for('userprofile', id=user.id) }}">{{ user.role }}: {{ user.name }} {{ user.surname }}</a>
                    </div>
                    <div class="article-metadata">
                        <small class="text-muted">{{ user.email }}</small>
                    </div>
                </div>
        </article>
        
{% endfor %}

{% endblock body%}