From af026718120778bc1bb8eb30c8442a8540b3965f Mon Sep 17 00:00:00 2001 From: AudricV <74829229+AudricV@users.noreply.github.com> Date: Wed, 29 Mar 2023 12:02:35 +0200 Subject: [PATCH] [Client] Improve admin login page --- truthinquiry/static/css/admin_ui.css | 75 +++++++++++++++------- truthinquiry/static/css/admin_ui_login.css | 34 ++++++++++ truthinquiry/templates/admin/auth.html | 40 +++++++++--- 3 files changed, 116 insertions(+), 33 deletions(-) create mode 100644 truthinquiry/static/css/admin_ui_login.css diff --git a/truthinquiry/static/css/admin_ui.css b/truthinquiry/static/css/admin_ui.css index b38fcc6..e263f7c 100644 --- a/truthinquiry/static/css/admin_ui.css +++ b/truthinquiry/static/css/admin_ui.css @@ -1,26 +1,53 @@ - #places>section { - border: thin solid red; - padding: 5px; - margin-top: 20px; - } +/* Custom fonts */ +@font-face { + font-display: swap; + font-family: "Roboto Mono"; + font-style: normal; + font-weight: 400; + src: url("../fonts/roboto_mono_v22/roboto_mono_v22.woff2") format('woff2'), url("../fonts/roboto_mono_v22/roboto_mono_v22.woff") format('woff'), url("../fonts/roboto_mono_v22/roboto_mono_v22.ttf") format('truetype'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} - #section>input{ - width: 100%; - } - - .questionTypeTag{ - border: thin solid red; - margin-top: 20px; - } - .questionTypeTag input{ - width: 100%; - } +:root { + --admin-grey-color: #5A5656; + --admin-red-color: #FF0000; + --adming-yellow-color: #FFC800; + --body-margin: 0.375em; + font-family: "Roboto Mono", sans-serif; +} - .questionType{ - border: thin solid red; - margin-top: 20px; - } - .question input{ - width: 100%; - margin: 10px; - } +html { + background-color: var(--admin-grey-color); + margin: 0; +} + +body { + margin: var(--body-margin); +} + +#places>section { + border: thin solid red; + padding: 5px; + margin-top: 20px; +} + +#section>input{ + width: 100%; +} + +.questionTypeTag{ + border: thin solid red; + margin-top: 20px; +} +.questionTypeTag input{ + width: 100%; +} + +.questionType{ + border: thin solid red; + margin-top: 20px; +} +.question input{ + width: 100%; + margin: 10px; +} diff --git a/truthinquiry/static/css/admin_ui_login.css b/truthinquiry/static/css/admin_ui_login.css new file mode 100644 index 0000000..5f17c34 --- /dev/null +++ b/truthinquiry/static/css/admin_ui_login.css @@ -0,0 +1,34 @@ +form { + align-items: center; + display: flex; + flex-direction: column; + justify-content: center; +} + +input { + font-family: "Roboto Mono", sans-serif; + font-size: 1em; + margin: 1em; + padding: 0.25em; +} + +.invalid_password { + color: var(--adming-yellow-color); + font-size: 1.125em; + margin-bottom: 0.25em; + margin-top: 0.25em; + text-align: center; +} + +.login_title { + font-size: 2em; + margin: 0.75em; + text-align: center; +} + +.password_field { + align-items: center; + display: flex; + flex-direction: row; + justify-content: center; +} diff --git a/truthinquiry/templates/admin/auth.html b/truthinquiry/templates/admin/auth.html index 66dd733..d8849bb 100644 --- a/truthinquiry/templates/admin/auth.html +++ b/truthinquiry/templates/admin/auth.html @@ -1,9 +1,31 @@ -{% if failed %} -
Invalid password !
-{% endif %} - - \ No newline at end of file + + + + +Mot de passe invalide !
+ {% endif %} + +