From 3a0e08f3f59b95d7328bb2338dd131b65371894e Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 11 Mar 2022 18:22:29 +0100 Subject: [PATCH] Move inline CSS to layout.css --- photo21/static/layout.css | 37 +++++++++++++++++++++ photo21/templates/account/base.html | 7 ---- photo21/templates/account/login.html | 2 +- photo21/templates/base.html | 23 +++++++++++-- photo21/templates/index.html | 18 ---------- photologue/templates/photologue/upload.html | 21 ------------ 6 files changed, 58 insertions(+), 50 deletions(-) create mode 100644 photo21/static/layout.css diff --git a/photo21/static/layout.css b/photo21/static/layout.css new file mode 100644 index 0000000..72c7b37 --- /dev/null +++ b/photo21/static/layout.css @@ -0,0 +1,37 @@ +/* Login view */ +.login { + max-width: 35rem; +} +.login .asteriskField { + display: none; +} +.login .form-group { + margin-top: 0.5em; +} + +/* Upload view */ +.upload-drop-zone { + height: 10em; + line-height: 10em; + border-width: 2px; + color: #a3a3a3; + border-style: dashed; + border-color: #a3a3a3; + border-radius: 0.5em; + text-align: center; + margin-bottom: 0.5em; +} +.upload-drop-zone.drop { + color: #222; + border-color: #222; + background-color: rgba(163, 163, 163, 0.274); +} + +/* Language selector */ +.lang-select { + border: none; + background: none; + color: inherit; + cursor: pointer; + text-decoration: underline; +} diff --git a/photo21/templates/account/base.html b/photo21/templates/account/base.html index 99e3781..416d47e 100644 --- a/photo21/templates/account/base.html +++ b/photo21/templates/account/base.html @@ -6,10 +6,3 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endcomment %} {% block title %}{% block head_title %}{% endblock %}{% endblock title %} - -{% block extracss %} - -{% endblock %} \ No newline at end of file diff --git a/photo21/templates/account/login.html b/photo21/templates/account/login.html index 18d46b2..db32d3d 100644 --- a/photo21/templates/account/login.html +++ b/photo21/templates/account/login.html @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later {% block head_title %}{% trans "Sign In" %}{% endblock %} {% block content %} -
+ {% endfor %}
- -
- - {% trans "Connected as" %} {{ request.user.username }}. -
- {% csrf_token %} - {% trans "Select another language:" %} - - -
{% endblock %} diff --git a/photologue/templates/photologue/upload.html b/photologue/templates/photologue/upload.html index 6b49a68..601fdad 100644 --- a/photologue/templates/photologue/upload.html +++ b/photologue/templates/photologue/upload.html @@ -7,27 +7,6 @@ SPDX-License-Identifier: GPL-3.0-or-later {% load i18n crispy_forms_tags %} {% block title %}{% trans "Upload" %}{% endblock %} -{% block extracss %} - -{% endblock %} - {% block extrajs %}