From 841f350b1779c09bcb22bdf28c48d1273a41f8a7 Mon Sep 17 00:00:00 2001 From: Beesquit Date: Thu, 4 Sep 2025 18:14:20 +0300 Subject: [PATCH] another style improvement for login page --- src/index.css | 1 + src/pages/login/login.css | 37 +++++++++++++++++++++---------------- src/pages/login/login.tsx | 20 ++++++++++---------- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/index.css b/src/index.css index d1bc414..b5a4566 100644 --- a/src/index.css +++ b/src/index.css @@ -3,6 +3,7 @@ --text_dark: rgba(255, 255, 255, 0.87); --links-main-color: #cc3f69; + --links-hover-color: #ab3659; --buttons-main-color: #a80032; --buttons-hover-color: #92002c; diff --git a/src/pages/login/login.css b/src/pages/login/login.css index 858513d..613b730 100644 --- a/src/pages/login/login.css +++ b/src/pages/login/login.css @@ -7,16 +7,6 @@ } -.login-right { - display: flex; - height: 100%; - flex-direction: column; - justify-content: center; - margin-left: auto; - margin-right: 5vw; - margin-left: 5vw; -} - .login-left { overflow: hidden; display: flex; @@ -26,14 +16,22 @@ margin-right: auto; } +.login-right { + display: flex; + height: 100%; + flex-direction: column; + margin-left: auto; + margin-right: 5vw; + margin-left: 5vw; + justify-content: inherit; +} + .login-logo-block { display: flex; flex-direction: column; justify-content: center; align-items: center; - margin-bottom: auto; - outline: solid 1px khaki; } .login-login-block { @@ -41,22 +39,24 @@ flex-direction: column; justify-content: center; align-items: center; - outline: solid 1px aquamarine; } - .login-links-block { display: flex; flex-direction: row; justify-content: space-around; align-items: center; - margin-top: auto; margin-bottom: 2vh; - outline: solid 1px olive; font-size: xx-small; } +.login-logo { + width: 200px; + height: 200px; +} + + .login-button { margin-top: "10px"; padding: 16px 32px; @@ -85,3 +85,8 @@ color: var(--links-main-color); text-decoration: none; } + +.login-link:hover { + color: var(--links-hover-color); + text-decoration: none; +} diff --git a/src/pages/login/login.tsx b/src/pages/login/login.tsx index f35de10..fba1820 100644 --- a/src/pages/login/login.tsx +++ b/src/pages/login/login.tsx @@ -24,9 +24,10 @@ const Login = () => { const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); + setUsernameEmpty(!username); + setPasswordEmpty(!password); + if (!username || !password) { - if (!username) setUsernameEmpty(true); - if (!password) setPasswordEmpty(true); return; } @@ -49,13 +50,9 @@ const Login = () => {

- I'm logo!! + Picrinth logo

- {/* logo */}
-

- Login -

{ required showError={usernameEmpty} errorMessage="Please enter your username" - /> + /> { required showError={passwordEmpty} errorMessage="Please enter your password" - /> + /> +

+ Create account +

@@ -96,7 +96,7 @@ const Login = () => { Backend

- Creator profile + Author