another style improvement for login page

This commit is contained in:
2025-09-04 18:14:20 +03:00
parent b887ac2624
commit 841f350b17
3 changed files with 32 additions and 26 deletions

View File

@ -3,6 +3,7 @@
--text_dark: rgba(255, 255, 255, 0.87); --text_dark: rgba(255, 255, 255, 0.87);
--links-main-color: #cc3f69; --links-main-color: #cc3f69;
--links-hover-color: #ab3659;
--buttons-main-color: #a80032; --buttons-main-color: #a80032;
--buttons-hover-color: #92002c; --buttons-hover-color: #92002c;

View File

@ -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 { .login-left {
overflow: hidden; overflow: hidden;
display: flex; display: flex;
@ -26,14 +16,22 @@
margin-right: auto; 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 { .login-logo-block {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-bottom: auto;
outline: solid 1px khaki;
} }
.login-login-block { .login-login-block {
@ -41,22 +39,24 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
outline: solid 1px aquamarine;
} }
.login-links-block { .login-links-block {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
margin-top: auto;
margin-bottom: 2vh; margin-bottom: 2vh;
outline: solid 1px olive;
font-size: xx-small; font-size: xx-small;
} }
.login-logo {
width: 200px;
height: 200px;
}
.login-button { .login-button {
margin-top: "10px"; margin-top: "10px";
padding: 16px 32px; padding: 16px 32px;
@ -85,3 +85,8 @@
color: var(--links-main-color); color: var(--links-main-color);
text-decoration: none; text-decoration: none;
} }
.login-link:hover {
color: var(--links-hover-color);
text-decoration: none;
}

View File

@ -24,9 +24,10 @@ const Login = () => {
const handleSubmit = (e: React.FormEvent) => { const handleSubmit = (e: React.FormEvent) => {
e.preventDefault(); e.preventDefault();
setUsernameEmpty(!username);
setPasswordEmpty(!password);
if (!username || !password) { if (!username || !password) {
if (!username) setUsernameEmpty(true);
if (!password) setPasswordEmpty(true);
return; return;
} }
@ -49,13 +50,9 @@ const Login = () => {
</div> </div>
<div className="login-right"> <div className="login-right">
<h2 className="login-logo-block"> <h2 className="login-logo-block">
I'm logo!! <img className="login-logo" src="./myautag.png" alt="Picrinth logo" />
</h2> </h2>
{/* <img className="login-logo-block" src="./myautag.png" alt="logo" /> */}
<div className="login-login-block"> <div className="login-login-block">
<h2>
Login
</h2>
<form onSubmit={handleSubmit} <form onSubmit={handleSubmit}
style={{ style={{
flexDirection: "column", flexDirection: "column",
@ -87,6 +84,9 @@ const Login = () => {
Login Login
</button> </button>
</form> </form>
<h2 style={{textAlign: "center"}}>
<a href="http://localhost:5173/register" className="login-link">Create account</a>
</h2>
</div> </div>
<div className="login-links-block"> <div className="login-links-block">
<h2> <h2>
@ -96,7 +96,7 @@ const Login = () => {
<a href="https://git.frik.su/Beesquit/picrinth-server" className="login-link">Backend</a> <a href="https://git.frik.su/Beesquit/picrinth-server" className="login-link">Backend</a>
</h2> </h2>
<h2> <h2>
<a href="https://git.frik.su/Beesquit" className="login-link">Creator profile</a> <a href="https://git.frik.su/Beesquit" className="login-link">Author</a>
</h2> </h2>
</div> </div>
</div> </div>