From 16dc4e235f04874d89b104211d38db5587d8b760 Mon Sep 17 00:00:00 2001 From: Pedro Barbosa Date: Mon, 5 Feb 2024 20:24:38 +0000 Subject: [PATCH 01/16] style: refatorando html base para reset --- project/app/static/css/base_style.css | 52 ++++++++ project/app/templates/base_reset.html | 44 +++++++ project/app/templates/cadastro.html | 120 ------------------ project/app/templates/cadastro_legado.html | 99 --------------- project/app/templates/password_reset.html | 10 ++ .../templates/password_reset_complete.html | 3 + .../app/templates/password_reset_confirm.html | 3 + .../app/templates/password_reset_done.html | 3 + project/app/templates/user_activity_logs.html | 6 +- project/app/urls.py | 6 +- project/project/urls.py | 16 +-- 11 files changed, 132 insertions(+), 230 deletions(-) create mode 100644 project/app/static/css/base_style.css create mode 100755 project/app/templates/base_reset.html delete mode 100755 project/app/templates/cadastro.html delete mode 100755 project/app/templates/cadastro_legado.html diff --git a/project/app/static/css/base_style.css b/project/app/static/css/base_style.css new file mode 100644 index 00000000..936f658a --- /dev/null +++ b/project/app/static/css/base_style.css @@ -0,0 +1,52 @@ +* { + font-family: 'Montserrat', sans-serif; +} + +html, body { + background-image: linear-gradient(#021842 50%, #253e6c); + height: fit-content; + margin: 0; + padding: 0; +} + +nav { + background-color: #021842; + padding-block: 25px; + box-shadow: 10px 5px 5px #021233; +} + +.link-primary { + text-decoration: none; + color: aliceblue; + padding-inline: 10px; +} + +.link-primary:hover { + color: rgb(185, 200, 212); +} + +body { + justify-content: space-between; + flex-direction: column; + display: flex; + margin: 0; +} + +footer { + color: aliceblue; + bottom: 0; + height: 2.5rem; +} + +/* @media (max-height: 600px) { + html, body { + height: 100vh; + } +} + +@media (min-height: 960px) { + html, body { + height: fit-content; + } +} */ + diff --git a/project/app/templates/base_reset.html b/project/app/templates/base_reset.html new file mode 100755 index 00000000..21594649 --- /dev/null +++ b/project/app/templates/base_reset.html @@ -0,0 +1,44 @@ +{% load static %} + + + + AutomaTEC + + + + + + + + + + + + + +
+ {% block conteudo %} + + {% endblock %} +
+ +
+
Copyright BRISA 2021©. Todos direitos reservados.
+
+ + \ No newline at end of file diff --git a/project/app/templates/cadastro.html b/project/app/templates/cadastro.html deleted file mode 100755 index 6b9f33f0..00000000 --- a/project/app/templates/cadastro.html +++ /dev/null @@ -1,120 +0,0 @@ - \ No newline at end of file diff --git a/project/app/templates/cadastro_legado.html b/project/app/templates/cadastro_legado.html deleted file mode 100755 index 3cc2e497..00000000 --- a/project/app/templates/cadastro_legado.html +++ /dev/null @@ -1,99 +0,0 @@ -{% load static %} - - - - AutomaTEC - - - - - - - - - - - - -
- finatec -

Sistema de prestação automático

-
- -
- -

Cadastrar

-
- {% csrf_token %} -
-
- - -
-
- - -
-
- -
- {% if error_messages %} -
    - {% for message in error_messages %} -
  • {{ message }}
  • - {% endfor %} -
- {% endif %} -

Possui uma conta? Logar

-
-
- - - - \ No newline at end of file diff --git a/project/app/templates/password_reset.html b/project/app/templates/password_reset.html index e69de29b..d6f1bbc0 100644 --- a/project/app/templates/password_reset.html +++ b/project/app/templates/password_reset.html @@ -0,0 +1,10 @@ +{% extends 'base_reset.html' %} {% block conteudo %} {% load static %} +
+
+

Testando

+

Testando

+

Testando

+ +
+
+{% endblock %} \ No newline at end of file diff --git a/project/app/templates/password_reset_complete.html b/project/app/templates/password_reset_complete.html index e69de29b..589248af 100644 --- a/project/app/templates/password_reset_complete.html +++ b/project/app/templates/password_reset_complete.html @@ -0,0 +1,3 @@ +{% extends 'base_reset.html' %} {% block conteudo %} {% load static %} + +{% endblock %} \ No newline at end of file diff --git a/project/app/templates/password_reset_confirm.html b/project/app/templates/password_reset_confirm.html index e69de29b..589248af 100644 --- a/project/app/templates/password_reset_confirm.html +++ b/project/app/templates/password_reset_confirm.html @@ -0,0 +1,3 @@ +{% extends 'base_reset.html' %} {% block conteudo %} {% load static %} + +{% endblock %} \ No newline at end of file diff --git a/project/app/templates/password_reset_done.html b/project/app/templates/password_reset_done.html index e69de29b..589248af 100644 --- a/project/app/templates/password_reset_done.html +++ b/project/app/templates/password_reset_done.html @@ -0,0 +1,3 @@ +{% extends 'base_reset.html' %} {% block conteudo %} {% load static %} + +{% endblock %} \ No newline at end of file diff --git a/project/app/templates/user_activity_logs.html b/project/app/templates/user_activity_logs.html index d8b97e50..b98d0ecd 100644 --- a/project/app/templates/user_activity_logs.html +++ b/project/app/templates/user_activity_logs.html @@ -1,4 +1,5 @@ +{% extends 'base.html' %} {% block conteudo %} {% load static %} @@ -11,7 +12,7 @@ -
+
{% block conteudo %} {% endblock %}
-
Copyright BRISA 2021©. Todos direitos reservados.
+
Copyright BRISA 2021©. Todos direitos reservados.
\ No newline at end of file diff --git a/project/app/templates/password_reset.html b/project/app/templates/password_reset.html index d6f1bbc0..479872f4 100644 --- a/project/app/templates/password_reset.html +++ b/project/app/templates/password_reset.html @@ -1,10 +1,38 @@ {% extends 'base_reset.html' %} {% block conteudo %} {% load static %} -
-
-

Testando

-

Testando

-

Testando

- +
+
+
+
+
+
+ Redefinição de senha +
+
+ Esqueceu sua senha? +
+

+ Forneça seu nome de usuário abaixo, e nós te enviaremos um email com instruções para configurar sua nova senha. +

+
+ +
+ +
+
+
+
+ + +
+
+ + +
+
+
+
+
+
{% endblock %} \ No newline at end of file diff --git a/project/app/templates/password_reset_done.html b/project/app/templates/password_reset_done.html index 589248af..8d83bcf1 100644 --- a/project/app/templates/password_reset_done.html +++ b/project/app/templates/password_reset_done.html @@ -1,3 +1,38 @@ {% extends 'base_reset.html' %} {% block conteudo %} {% load static %} +
+
+
+
+
+
+ Redefinição de senha +
+
+ Link enviado +
+

+ O link de redefinição de senha foi enviado para o seguinte endereço de email: +

+
+ pe*********sa@finatec.org.br +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
{% endblock %} \ No newline at end of file From 289652a9be740bc7558ce8f2e0124b8086ded255 Mon Sep 17 00:00:00 2001 From: Pedro Barbosa Date: Tue, 6 Feb 2024 18:06:50 +0000 Subject: [PATCH 03/16] =?UTF-8?q?refact:=20refatora=C3=A7=C3=A3o=20da=20ho?= =?UTF-8?q?mepage=20utilizando=20novo=20html=20base?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/app/static/css/new_home.css | 19 ++++++++ project/app/templates/home.html | 43 +++++++------------ .../templates/password_reset_complete.html | 35 +++++++++++++++ project/project/urls.py | 8 ++-- 4 files changed, 73 insertions(+), 32 deletions(-) create mode 100644 project/app/static/css/new_home.css diff --git a/project/app/static/css/new_home.css b/project/app/static/css/new_home.css new file mode 100644 index 00000000..4a2f58de --- /dev/null +++ b/project/app/static/css/new_home.css @@ -0,0 +1,19 @@ +:root { + --btn-hover: #F39B00; + --text-color: aliceblue; +} + +.btn { + padding: 15px 50px 15px 50px; + background-color: var(--text-color); + border-radius: 20px; +} + +.btn:hover { + transition: 300ms; + background-color: var(--btn-hover); +} + +h5 { + color: rgb(212, 212, 212); +} \ No newline at end of file diff --git a/project/app/templates/home.html b/project/app/templates/home.html index c66d1bd0..1ec67c39 100755 --- a/project/app/templates/home.html +++ b/project/app/templates/home.html @@ -1,37 +1,24 @@ -{% extends 'base.html' %} +{% extends 'base_reset.html' %} {% block conteudo %} {% load static %} - - - + -
- - -
+
+
+
+

Automatec

+
Sistema de prestação de contas automático.
Facilidade no dia a dia da FINATEC.
+ +
- -
-
-

Automatec

-

Sistema de prestação de contas automático.
Facilidade no dia a dia da FINATEC.

- + + +
-
- logo +
+ logo
- +
{% endblock %} \ No newline at end of file diff --git a/project/app/templates/password_reset_complete.html b/project/app/templates/password_reset_complete.html index 589248af..8d83bcf1 100644 --- a/project/app/templates/password_reset_complete.html +++ b/project/app/templates/password_reset_complete.html @@ -1,3 +1,38 @@ {% extends 'base_reset.html' %} {% block conteudo %} {% load static %} +
+
+
+
+
+
+ Redefinição de senha +
+
+ Link enviado +
+

+ O link de redefinição de senha foi enviado para o seguinte endereço de email: +

+
+ pe*********sa@finatec.org.br +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
{% endblock %} \ No newline at end of file diff --git a/project/project/urls.py b/project/project/urls.py index 7c00b915..a749fc72 100755 --- a/project/project/urls.py +++ b/project/project/urls.py @@ -9,11 +9,11 @@ # path('reset_password/', auth_views.PasswordResetView.as_view(), name="reset_password"), # path('reset_password_sent/', auth_views.PasswordResetDoneView.as_view(), name="password_reset_done"), - # path('reset//', auth_views.PasswordResetConfirmView.as_view(), name="password_reset_confirm"), - # path('reset_password_complete/', auth_views.PasswordResetCompleteView.as_view(), name="password_reset_complete"), + path('reset//', auth_views.PasswordResetConfirmView.as_view(), name="password_reset_confirm"), + path('reset_password_complete/', auth_views.PasswordResetCompleteView.as_view(), name="password_reset_complete"), path('reset_password/', auth_views.PasswordResetView.as_view(template_name="password_reset.html"), name="reset_password"), path('reset_password_sent/', auth_views.PasswordResetDoneView.as_view(template_name="password_reset_done.html"), name="password_reset_done"), - path('reset//', auth_views.PasswordResetConfirmView.as_view(template_name="password_reset_confirm.html"), name="password_reset_confirm"), - path('reset_password_complete/', auth_views.PasswordResetCompleteView.as_view(template_name="password_reset_complete.html"), name="password_reset_complete"), + # path('reset//', auth_views.PasswordResetConfirmView.as_view(template_name="password_reset_confirm.html"), name="password_reset_confirm"), + # path('reset_password_complete/', auth_views.PasswordResetCompleteView.as_view(template_name="password_reset_complete.html"), name="password_reset_complete"), ] From 836395055dc3eb33505dc8437f91d6213d8f12ac Mon Sep 17 00:00:00 2001 From: Pedro Barbosa Date: Tue, 6 Feb 2024 18:18:11 +0000 Subject: [PATCH 04/16] fix: remocao do link da navbar quando esta na propria pagina --- project/app/templates/base_reset.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/project/app/templates/base_reset.html b/project/app/templates/base_reset.html index a7a46fdd..4e001461 100755 --- a/project/app/templates/base_reset.html +++ b/project/app/templates/base_reset.html @@ -18,18 +18,30 @@
+ {% if request.path != '/' %} finatec + {% else %} + finatec + {% endif %}
-
+
+ {% if request.path == '/' %} + Login + Admin + {% elif request.path == '/login/' %} + Home + Admin + {% else %} Home Login Admin + {% endif %}
- +
{% block conteudo %} From 1009633aadcd851be99c567df15565c03b79d1cb Mon Sep 17 00:00:00 2001 From: Pedro Barbosa Date: Tue, 6 Feb 2024 20:11:06 +0000 Subject: [PATCH 05/16] refact: refatoracao da tela de login usando a base de layout --- project/app/static/css/base_style.css | 3 + project/app/static/imagem/logo50%.svg | 15 ++++ project/app/templates/base_reset.html | 6 ++ project/app/templates/home.html | 1 - project/app/templates/login.html | 123 +++++++++++++++++--------- 5 files changed, 107 insertions(+), 41 deletions(-) create mode 100644 project/app/static/imagem/logo50%.svg diff --git a/project/app/static/css/base_style.css b/project/app/static/css/base_style.css index a08d2840..f6b381b3 100644 --- a/project/app/static/css/base_style.css +++ b/project/app/static/css/base_style.css @@ -40,6 +40,9 @@ footer { height: 2.5rem; } +/* tentativa de deixar a tela responsiva + se o content passa da margem da tela + a cor de fundo nao acompanha */ /* @media (min-height: 100vh) { html, body { height: fit-content; diff --git a/project/app/static/imagem/logo50%.svg b/project/app/static/imagem/logo50%.svg new file mode 100644 index 00000000..ab1a7bff --- /dev/null +++ b/project/app/static/imagem/logo50%.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/project/app/templates/base_reset.html b/project/app/templates/base_reset.html index 4e001461..6ac5eeaa 100755 --- a/project/app/templates/base_reset.html +++ b/project/app/templates/base_reset.html @@ -7,6 +7,8 @@ + + @@ -17,6 +19,8 @@