{% load static %}
<!DOCTYPE html>
<html lang="fr-fr">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>{% block title %}{% endblock title %}</title>
        <link href="{% static 'main.css' %}" rel="stylesheet" type="text/css">
        <script src="https://kit.fontawesome.com/0fd87250ec.js" crossorigin="anonymous"></script>
        {% block head %}{% endblock head %}
    </head>
    <body>
        <header>
            {% if request.user.is_authenticated %}
            <div class="bandeau">
                Vous êtes connecté avec le compte <b>{{ user.username }}</b>.
                {% if request.session.profile == "student" %}
                    Profil actuel : étudiant.
                {% elif request.session.profile == "colleur" %}
                    Profil actuel : colleur.
                {% else %}
                    Pas de profil.
                {% endif %}
                <form action="{% url 'logout' %}" method="post">
                    {% csrf_token %}
                    <button type="submit">Se déconnecter</button>
                </form>
            </div>
            {% endif %}

            {% block header %}{% endblock header %}
        </header>
        <main>
            {% block main %}{% endblock main %}
        </main>
        <footer>
            {% block footer %}&copy; colles.mp2i-vms.fr 2024 - <a href="https://git.mp2i-vms.fr/mp2i-vms/kholles-web" target="_blank">Code source</a> - <a href="https://www.gnu.org/licenses/agpl-3.0.html" target="_blank">Licence GNU AGPL v3 or later</a>{% endblock footer %}
        </footer>
    </body>