login pages are done

This commit is contained in:
Nikolai Petukhov
2024-09-21 17:03:09 +03:00
parent 93ed4ce7fc
commit 2a56274ca9
22 changed files with 248 additions and 32 deletions

View File

@@ -0,0 +1,14 @@
import React from 'react';
import { URLs } from "../../__data__/urls";
import { FaHome } from 'react-icons/fa';
const Header = () => {
return (
<a href={URLs.account.url} className="accountLink">
<FaHome className="houseIcon"/>
<p>My profile</p>
</a>
);
};
export default Header;

View File

@@ -0,0 +1,38 @@
.houseIcon {
transition: color 0.3s ease-in;
}
.accountLink {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.accountLink p {
font-size: 1.5vw;
transition: color 0.3s ease-out;
}
.accountLink svg {
font-size: 3vw;
transition: fill 0.3s ease-in;
}
.accountLink:hover p {
color: white;
}
.accountLink:hover svg {
fill: orange;
}
@media only screen and (max-width: 800px) {
.accountLink p {
font-size: 1.8vh;
}
.accountLink svg {
font-size: 4vh;
}
}

View File

@@ -1,2 +1,3 @@
@import url("./css/card.css");
@import url("./css/homeTitle.css");
@import url("./css/homeTitle.css");
@import url("./css/accountLink.css");

View File

@@ -2,10 +2,14 @@ import React from 'react';
const InputField = (props) => {
return (
<input
onChange={(e) => props.setValue(e.target.value)}
value={props.value}
/>
<div>
<p>{props.title}</p>
<input
onChange={(e) => props.setValue(e.target.value)}
value={props.value}
className="Input"
/>
</div>
);
};

View File

@@ -0,0 +1,28 @@
import React from 'react';
import { URLs } from "../../__data__/urls";
const LoginButtons = (props) => {
const ref = props.isAuth ? URLs.reg.url : URLs.auth.url
return (
<div>
<div className="LoginButtons">
<a className="MyButton loginButton" onClick={() => (
props.submitHandler()
)}>
{props.isAuth
? <p className="mclaren-regular">Login</p>
: <p className="mclaren-regular">Register</p>}
</a>
<a className="MyButton loginButton" href={ref}>
{props.isAuth
? <p className="mclaren-regular">Registration</p>
: <p className="mclaren-regular">I have an account</p>}
</a>
</div>
</div>
);
};
export default LoginButtons;

View File

@@ -0,0 +1,58 @@
.LoginButtons {
margin-top: 5rex;
display: flex;
flex-direction: column;
align-items: center;
}
.LoginButtons a {
margin-bottom: 15px;
width: 12rem;
display: flex;
}
.Input {
border: 0;
background-color: black;
color: orange;
border-radius: 5px;
padding: 10px;
width: 18rem;
}
.MyButton.loginButton {
padding: 0;
}
.MyButton.loginButton p {
color: orange;
transition: color 0.3s ease-in;
font-size: 1.3vw;
font-weight: 500;
}
.loginTitle {
font-size: 4vw;
transition: color 0.3s ease-in;
}
.loginTitle:hover {
color: orange;
}
@media only screen and (max-width: 800px) {
.MyButton.loginButton p {
font-size: 1.5vh;
}
}
.loginButton:hover p {
color: black;
}

View File

@@ -1 +1 @@
@import url("./css/input.css");
@import url("./css/login.css");

View File

@@ -0,0 +1,12 @@
import React from 'react';
import { URLs } from "../../__data__/urls";
const LoginTitle = () => {
return (
<a href={URLs.baseUrl}>
<h1 className="loginTitle mclaren-regular">Enterfront</h1>
</a>
);
};
export default LoginTitle;