diff --git a/core/static/user/login.scss b/core/static/user/login.scss new file mode 100644 index 00000000..4121579e --- /dev/null +++ b/core/static/user/login.scss @@ -0,0 +1,78 @@ +html, +body { + box-sizing: border-box; + height: 100%; +} + +body { + display: flex; + flex-direction: column; +} + +#page { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +#quick_notif, +#info_boxes, +#page > nav { + display: none !important; +} + +#content { + display: flex; + flex-direction: column; + padding: 10px !important; + box-shadow: none !important; + background-color: white !important; + margin: 0; + + > div, + > form { + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 10px; + width: 100%; + max-width: 500px; + + > div { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 100%; + + > label { + width: 100%; + + @media (min-width: 500px) { + width: 300px; + } + } + } + + > input, + > div > input { + box-sizing: border-box; + width: 100%; + max-width: 500px; + + @media (min-width: 500px) { + max-width: 300px; + } + } + + > .danger, + > div > error { + color: red; + text-align: center; + } + } +} \ No newline at end of file diff --git a/core/templates/core/login.jinja b/core/templates/core/login.jinja index 789e38a7..c7d37241 100644 --- a/core/templates/core/login.jinja +++ b/core/templates/core/login.jinja @@ -1,35 +1,65 @@ {% extends "core/base.jinja" %} +{%- block additional_css -%} + + +{%- endblock -%} + {% block title %} -{% trans %}Login{% endtrans %} + {% trans %}Login{% endtrans %} {% endblock %} {% block content %} -{% if form.errors %} -

{% trans %}Your username and password didn't match. Please try again.{% endtrans %}

-{% endif %} -{% if next %} - {% if user.is_authenticated %} -

{% trans %}Your account doesn't have access to this page. To proceed, - please login with an account that has access.{% endtrans %}

- {% else %} -

{% trans %}Please login or create an account to see this page.{% endtrans %}

+ {% if next %} + {% if user.is_authenticated %} +

{% trans %}Your account doesn't have access to this page. To proceed, + please login with an account that has access.{% endtrans %}

+ {% else %} +

{% trans %}Please login or create an account to see this page.{% endtrans %}

+ {% endif %} {% endif %} -{% endif %} -
-{% csrf_token %} -

{{ form.username.errors }}

-

{{ form.password.errors }}{{ form.password }}

- -

-
+
+ {% if form.errors %} +

{% trans %}Your username and password didn't match. Please try again.{% endtrans %}

+
+ {% endif %} -{# Assumes you setup the password_reset view in your URLconf #} -

{% trans %}Lost password?{% endtrans %}

-

{% trans %}Create account{% endtrans %}

+ {% csrf_token %} +
+ + + {{ form.username.errors }} +
+ +
+ + {{ form.password }} + {{ form.password.errors }} +
+ + + + + + {# Assumes you setup the password_reset view in your URLconf #} +

+ {% trans %}Lost password?{% endtrans %} +    + {% trans %}Create account{% endtrans %} +

+
+{% endblock %} + +{% block additional_js %} + {% endblock %}