From f0d29a64856a4664244f2b2f9a53f99d1dd29b2f Mon Sep 17 00:00:00 2001 From: Dorian Lesbre <dorian.lesbre@gmail.com> Date: Tue, 2 Mar 2021 18:57:17 +0100 Subject: [PATCH] Beautify login page --- home/static/css/style.css | 20 ++++++++++++++++++++ home/templates/registration/login.html | 7 +++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/home/static/css/style.css b/home/static/css/style.css index 0343cc5..f733d3e 100644 --- a/home/static/css/style.css +++ b/home/static/css/style.css @@ -161,6 +161,26 @@ dl dd { text-align: left; } +input[type=submit] { + color: white; + background-color: var(--color_bg_1); + padding: 5px 10px; + border-width: 0; + cursor: pointer; +} + +input[type=submit]:hover { + background-color: var(--color_bg_2); +} + +div.error { + color: red; + border: 2px solid red; + border-radius: 5px; + padding: 5px; + margin: 10px; +} + footer { position: absolute; bottom: 0; diff --git a/home/templates/registration/login.html b/home/templates/registration/login.html index 58bf9ad..bc71cce 100644 --- a/home/templates/registration/login.html +++ b/home/templates/registration/login.html @@ -4,19 +4,18 @@ {% block "content" %} <div id="content-area"> + <h2>Connexion</h2> {% if form.errors %} - <p>Login ou mot de passe incorrect</p> + <div class="error">Login ou mot de passe incorrect</div> {% endif %} {% if next %} {% if user.is_authenticated %} - <p>Accès non autorisé.</p> + <div class="error">Accès non autorisé.</div> {% else %} <p>Merci de vous connecter.</p> {% endif %} {% endif %} - - <h2>Connexion</h2> <form method="post" action="{% url "accounts:login" %}?next={{ next|urlencode }}"> {% csrf_token %} <table> -- GitLab