diff --git a/home/templates/activites.html b/home/templates/activites.html index 9a629adfc5b199c80f8fbaf0fb103a93fa1ce3c8..d126df32735e2d9fdd1188777a21d23831c29ed0 100644 --- a/home/templates/activites.html +++ b/home/templates/activites.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block nav_activite %}current{% endblock %} + {% block "content" %} <h2>Activités</h2> <p>Durant tout l'événement, des jeux seront en libre-service et des tables disponibles pour jouer. diff --git a/home/templates/base.html b/home/templates/base.html index bf3dc558201de42ee22cce6230f6d46c6e873063..bb835f00a960962cb5c1516827609ae087fe46fc 100644 --- a/home/templates/base.html +++ b/home/templates/base.html @@ -8,7 +8,7 @@ <title>Interludes 2021</title> <meta name="description" content="Inscriptions et infos sur les interENS ludiques, édition 2021"> <meta name="keywords" content="Interludes ENS événement COF 2021 InterENS"> - <link rel="icon" type="image/png" href="/static/imgs/favicon.ico"/> + <link rel="icon" type="image/png" href="{% static 'imgs/favicon.ico' %}"> <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}"> </head> @@ -24,30 +24,30 @@ </header> <nav> - <a href="/" rel="text/html" - class={% if request.path == "/" %}"current"{% else %}"internal"{% endif %}> + <a href="{% url 'home' %}" rel="text/html" + class="{% block nav_home %}{% endblock %}"> Accueil </a> - <a href="/inscription/" rel="text/html" - class={% if request.path == "/inscription/" %}"current"{% else %}"internal"{% endif %}> + <a href="{% url 'inscription' %}" rel="text/html" + class="{% block nav_inscription %}{% endblock %}"> Inscriptions </a> - <a href="/activites/" rel="text/html" - class={% if request.path == "/activites/" %}"current"{% else %}"internal"{% endif %}> + <a href="{% url 'activites' %}" rel="text/html" + class="{% block nav_activite %}{% endblock %}"> Activités </a> - <a href="/faq/" rel="text/html" - class={% if request.path == "/faq/" %}"current"{% else %}"internal"{% endif %}> + <a href="{% url 'FAQ' %}" rel="text/html" + class="{% block nav_faq %}{% endblock %} "> FAQ </a> {% if request.user.is_authenticated %} - <a href="{% url "accounts:logout" %}" - class={% if request.path == "/accounts/logout/" %}"logout current"{% else %}"logout"{% endif %}> + <a href="{% url 'accounts:logout' %}" + class="{% block nav_logout %}{% endblock %} "> Déconnexion </a> {% else %} - <a href="{% url "accounts:login" %}" - class={% if request.path == "/accounts/login/" %}"login current"{% else %}"login"{% endif %}> + <a href="{% url 'accounts:login' %}" + class="{% block nav_login %}{% endblock %} "> Connexion </a> {% endif %} diff --git a/home/templates/faq.html b/home/templates/faq.html index 8b3fb67169971f1622aa3b1e2b27f06fdc6ad670..885e9388cd0ce3375e666f66fcdb72cb0b2df753 100644 --- a/home/templates/faq.html +++ b/home/templates/faq.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block nav_faq %}current{% endblock %} + {% block "content" %} <h2>Une question ?</h2> <p>Une réponse</p> diff --git a/home/templates/home.html b/home/templates/home.html index 96fef1f1043132c4e66327e10ebd0e225f8e8c12..398b90fd4567cc4aee4bcf9715bdfb01c271fdcb 100644 --- a/home/templates/home.html +++ b/home/templates/home.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block nav_home %}current{% endblock %} + {% block "content" %} <h2>Présentation</h2> <p> diff --git a/home/templates/inscription.html b/home/templates/inscription.html index 4817b198a01778989979faf6766c11d6797129ba..1411c528d533753bd1b2ccd34f44718ec202caf6 100644 --- a/home/templates/inscription.html +++ b/home/templates/inscription.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block nav_inscription %}current{% endblock %} + {% block "content" %} <h2>Inscriptions</h2> <p> diff --git a/home/templates/registration/login.html b/home/templates/registration/login.html index af9748453623d11a5c6b35d81fd0bb4aa3b82491..58bf9adf5c6905c36f0770b9b68c305d340241e4 100644 --- a/home/templates/registration/login.html +++ b/home/templates/registration/login.html @@ -1,5 +1,7 @@ {% extends "base.html" %} +{% block nav_login %}current{% endblock %} + {% block "content" %} <div id="content-area"> {% if form.errors %} @@ -27,6 +29,7 @@ <td>{{ form.password }}</td> </tr> </table> + <br> <input type="submit" value="connexion" /> <input type="hidden" name="next" value="{{ next }}" />