Rework of the register page CSS & tweaked the login page

This commit is contained in:
Julien Constant 2023-03-12 13:54:46 +01:00
parent 79e7fcf15e
commit 550fac7752
No known key found for this signature in database
GPG Key ID: 816E7C070117E5B7
4 changed files with 69 additions and 17 deletions

View File

@ -31,6 +31,11 @@ body {
background-color: white !important; background-color: white !important;
margin: 0; margin: 0;
> .title {
text-align: center;
margin: 0;
}
> div, > div,
> form { > form {
box-sizing: border-box; box-sizing: border-box;
@ -41,13 +46,16 @@ body {
gap: 10px; gap: 10px;
width: 100%; width: 100%;
max-width: 500px; max-width: 500px;
margin-top: 20px;
> p,
> div { > div {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100%; width: 100%;
margin: 0;
> label { > label {
width: 100%; width: 100%;
@ -59,6 +67,7 @@ body {
} }
> input, > input,
> p > input,
> div > input { > div > input {
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
@ -70,9 +79,37 @@ body {
} }
> .danger, > .danger,
> div > error { > .errorlist {
color: red; color: red;
text-align: center; text-align: center;
margin: 10px 0 0 0;
list-style-type: none;
}
> .required > .helptext {
text-align: center;
font-style: italic;
}
> .required:last-of-type {
box-sizing: border-box;
max-width: 300px;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
> label {
width: 100%;
}
> img {
width: 70px;
object-fit: contain;
}
> input {
width: 200px;
}
} }
} }
} }

View File

@ -10,7 +10,7 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<h1 class="title">{% trans %}Login{% endtrans %}</h1>
{% if next %} {% if next %}
{% if user.is_authenticated %} {% if user.is_authenticated %}

View File

@ -1,20 +1,35 @@
{% extends "core/base.jinja" %} {% extends "core/base.jinja" %}
{% block title %}{% trans %}Register a user{% endtrans %}{% endblock %} {%- block additional_css -%}
<link rel="stylesheet" href="{{ scss('core/override.scss') }}">
<link rel="stylesheet" href="{{ scss('user/login.scss') }}">
{%- endblock -%}
{% block title %}{% trans %}Register{% endtrans %}{% endblock %}
{% block content %} {% block content %}
<h1>{% trans %}Register a user{% endtrans %}</h1> <h1 class="title">{% trans %}Register{% endtrans %}</h1>
{% if user_registered %} {% if user_registered %}
{% trans user_name=user_registered.get_display_name() %}Welcome {{ user_name }}!{% endtrans %} {% trans user_name=user_registered.get_display_name() %}Welcome {{ user_name }}!{% endtrans %}<br>
{% trans %}You successfully registred and you will soon receive a confirmation mail.{% endtrans %} {% trans %}You successfully registred and you will soon receive a confirmation mail.{% endtrans %}<br>
{% trans username=user_registered.username %}Your username is {{ username }}.{% endtrans %}<br>
{% trans username=user_registered.username %}Your username is {{ username }}.{% endtrans %}
{% endif %} {% else %}
<form action="{{ url('core:register') }}" method="post">
<form action="{{ url('core:register') }}" method="post"> {% csrf_token %}
{% csrf_token %} {{ form }}
{{ form }} <input type="submit" value="{% trans %}Register{% endtrans %}" />
<p><input type="submit" value="{% trans %}Register{% endtrans %}" /></p> </form>
</form> {% endif %}
{% endblock %}
{% block additional_js %}
<script defer>
$(() => {
$("#info_boxes").remove();
$("#page > nav").remove();
$("#quick_notif").remove();
})
</script>
{% endblock %} {% endblock %}

View File

@ -2402,7 +2402,7 @@ msgstr "Connexion"
#: core/templates/core/base.jinja:62 core/templates/core/register.jinja:18 #: core/templates/core/base.jinja:62 core/templates/core/register.jinja:18
msgid "Register" msgid "Register"
msgstr "S'enregister" msgstr "Inscription"
#: core/templates/core/base.jinja:85 core/templates/core/base.jinja:86 #: core/templates/core/base.jinja:85 core/templates/core/base.jinja:86
#: forum/templates/forum/macros.jinja:171 #: forum/templates/forum/macros.jinja:171