Commit 18a87882 authored by hypsug0's avatar hypsug0
Browse files

feat: login/logout links in top right page

parent bbbc7161
......@@ -111,6 +111,25 @@ header h1 {
height: 50px;
}
.page-header .links {
color: white;
/* margin-top: 8px;
margin-right: 5px; */
position: absolute;
top: 10px;
right: 10px;
}
.page-header .links a {
color: white;
}
.page-header .links a:hover {
color: grey;
}
@media screen and (min-width: 768px) {
.page-header {
......
{% load staticfiles %}
{% load staticfiles i18n %}
<header>
<div class="page-header">
<img src="{% static 'img/logo_site.png' %}" loading="lazy">
{% if user.is_authenticated %}
<div class="links">
{{ user.get_username }}
<a
href="{% url 'auth_logout' %}"
title="{% trans 'Se déconnecter' %}"
><i
class="fa fa-fw fa-sign-out-alt"
aria-hidden="true"
></i>
</a>
</div>
{% else %}
<div class="links">
<a href="{% url 'auth_login' %}" title="{% trans 'Se connecter' %}"
><i
class="fa fa-fw fa-sign-in-alt"
aria-hidden="true"
></i>
</a>
</div>
{% endif %}
<img src="{% static 'img/logo_site.png' %}" loading="lazy" />
<h1>{{ SITE_NAME }}</h1>
</div>
</header>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment