finish log in styled
This commit is contained in:
parent
235711d3d6
commit
7e7fb6d46a
|
@ -94,7 +94,6 @@ export default function HomePage() {
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<div className="HomePage">
|
<div className="HomePage">
|
||||||
<NavBar />
|
|
||||||
|
|
||||||
<ColoredSection >
|
<ColoredSection >
|
||||||
|
|
||||||
|
@ -229,6 +228,7 @@ export default function HomePage() {
|
||||||
|
|
||||||
</ColoredSection>
|
</ColoredSection>
|
||||||
<Sidebar />
|
<Sidebar />
|
||||||
|
<NavBar />
|
||||||
|
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|
|
@ -4,7 +4,31 @@ import UserContext from "../context/UserContext";
|
||||||
import Axios from "axios";
|
import Axios from "axios";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import ErrorNotice from "./ErrorNotice";
|
import ErrorNotice from "./ErrorNotice";
|
||||||
|
import styled from 'styled-components';
|
||||||
|
import {Button, FormCenter, FormField, FormLabel, FormInput, FormLink } from './miscellaneous/Styles'
|
||||||
|
|
||||||
|
const CheckBoxLabel = styled.label`
|
||||||
|
|
||||||
|
color: #646F7D;
|
||||||
|
font-size: .9em;
|
||||||
|
|
||||||
|
`;
|
||||||
|
const CheckBox = styled.input`
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
top: 1.5px;
|
||||||
|
`;
|
||||||
|
const TermsLink = styled.a`
|
||||||
|
|
||||||
|
color: #646F7D;
|
||||||
|
border-bottom: 1px solid #199087;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
margin-left: 5px;
|
||||||
|
|
||||||
|
|
||||||
|
`;
|
||||||
const Register = () => {
|
const Register = () => {
|
||||||
const [email, setEmail] = useState();
|
const [email, setEmail] = useState();
|
||||||
const [password, setPassword] = useState();
|
const [password, setPassword] = useState();
|
||||||
|
@ -38,34 +62,33 @@ import ErrorNotice from "./ErrorNotice";
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="FormCenter">
|
<FormCenter>
|
||||||
{error && (
|
{error && (
|
||||||
<ErrorNotice message={error} clearError={() => setError(undefined)} />
|
<ErrorNotice message={error} clearError={() => setError(undefined)} />
|
||||||
)}
|
)}
|
||||||
<form className="FormFields" onSubmit={submit}>
|
<form className="FormFields" onSubmit={submit}>
|
||||||
<div className="FormField">
|
<FormField>
|
||||||
<label className="FormField__Label" htmlFor="name">UserName</label>
|
<FormLabel htmlFor="name">UserName</FormLabel>
|
||||||
<input
|
<FormInput
|
||||||
type="text"
|
type="text"
|
||||||
id="name"
|
id="name"
|
||||||
className="FormField__Input"
|
|
||||||
placeholder="Enter your full name"
|
placeholder="Enter your full name"
|
||||||
onChange= { (e) => setUsername(e.target.value)}
|
onChange= { (e) => setUsername(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</FormField>
|
||||||
<div className="FormField">
|
<FormField>
|
||||||
<label className="FormField__Label" htmlFor="password">Password</label>
|
<FormLabel htmlFor="password">Password</FormLabel>
|
||||||
<input
|
<FormInput
|
||||||
type="password"
|
type="password"
|
||||||
id="password"
|
id="password"
|
||||||
className="FormField__Input"
|
className="FormField__Input"
|
||||||
placeholder="Enter your password"
|
placeholder="Enter your password"
|
||||||
onChange= { (e) => setPassword(e.target.value)}
|
onChange= { (e) => setPassword(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</FormField>
|
||||||
<div className="FormField">
|
<FormField>
|
||||||
<label className="FormField__Label" htmlFor="email">E-Mail Address</label>
|
<FormLabel htmlFor="email">E-Mail Address</FormLabel>
|
||||||
<input
|
<FormInput
|
||||||
type="email"
|
type="email"
|
||||||
id="email"
|
id="email"
|
||||||
className="FormField__Input"
|
className="FormField__Input"
|
||||||
|
@ -73,29 +96,37 @@ import ErrorNotice from "./ErrorNotice";
|
||||||
onChange= { (e) => setEmail(e.target.value)}
|
onChange= { (e) => setEmail(e.target.value)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</FormField>
|
||||||
<div className="FormField">
|
<FormField>
|
||||||
<label className="FormField__Label" htmlFor="phone">Phone number</label>
|
<FormLabel htmlFor="phone">Phone number</FormLabel>
|
||||||
<input
|
<FormInput
|
||||||
type="number"
|
type="number"
|
||||||
id="phonenumber"
|
id="phonenumber"
|
||||||
className="FormField__Input"
|
className="FormField__Input"
|
||||||
placeholder="Enter your Phone no. (+91)"
|
placeholder="Enter your Phone no. (+91)"
|
||||||
onChange= { (e) => setPhonenumber(parseInt( e.target.value,10))}
|
onChange= { (e) => setPhonenumber(parseInt( e.target.value,10))}
|
||||||
/>
|
/>
|
||||||
</div>
|
</FormField>
|
||||||
|
|
||||||
<div className="FormField">
|
<FormField>
|
||||||
<label className="FormField__CheckboxLabel">
|
<CheckBoxLabel>
|
||||||
<input className="FormField__Checkbox" type="checkbox" name="hasAgreed" required="true" /> I agree all statements in <a href="/" className="FormField__TermsLink">terms of service</a>
|
<CheckBox type="checkbox" name="hasAgreed" required="true" /> I agree all statements in <a href="/" className="FormField__TermsLink">terms of service</a>
|
||||||
</label>
|
</CheckBoxLabel>
|
||||||
</div>
|
</FormField>
|
||||||
|
|
||||||
<div className="FormField">
|
<FormField>
|
||||||
<button className="FormField__Button mr-20" type="submit">Sign Up</button> <Link to="/login" className="FormField__Link">already a member?</Link>
|
<Button
|
||||||
</div>
|
type="submit"
|
||||||
|
radiuscolor="#009578"
|
||||||
|
textcolor="#009578"
|
||||||
|
hovercolor="#009578"
|
||||||
|
hovertextcolor="white"
|
||||||
|
|
||||||
|
>Sign Up</Button>
|
||||||
|
<FormLink to="/login">already a member?</FormLink>
|
||||||
|
</FormField>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</FormCenter>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,50 @@
|
||||||
import styled from 'styled-components'
|
import styled from 'styled-components'
|
||||||
|
import { Link } from 'react-router-dom'
|
||||||
|
const FormCenter = styled.div`
|
||||||
|
margin-bottom: 100px;
|
||||||
|
|
||||||
|
`;
|
||||||
|
const FormField = styled.div`
|
||||||
|
|
||||||
const Button = styled.a`
|
margin-bottom: 40px;
|
||||||
|
`;
|
||||||
|
const FormLabel = styled.div`
|
||||||
|
display: block;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 1.25em;
|
||||||
|
color: #4C5D72;
|
||||||
|
text-align: start;
|
||||||
|
|
||||||
|
`;
|
||||||
|
const FormInput = styled.input`
|
||||||
|
|
||||||
|
width: 85%;
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
color: #4C5D72;
|
||||||
|
outline: none;
|
||||||
|
border-bottom: 1px solid #445366;
|
||||||
|
font-size: .9em;
|
||||||
|
font-weight: 300;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-top: 10px;
|
||||||
|
|
||||||
|
&:placeholder {
|
||||||
|
color: #616E7F;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
const FormLink = styled(Link)`
|
||||||
|
|
||||||
|
color: #66707D;
|
||||||
|
text-decoration: none;
|
||||||
|
display: inline-block;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
margin-left: 12px;
|
||||||
|
|
||||||
|
`;
|
||||||
|
|
||||||
|
const Button = styled.button`
|
||||||
|
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 15px auto;
|
margin: 15px auto;
|
||||||
|
@ -26,4 +69,4 @@ const Button = styled.a`
|
||||||
|
|
||||||
|
|
||||||
`;
|
`;
|
||||||
export { Button };
|
export { Button, FormCenter, FormField, FormLabel, FormInput, FormLink };
|
|
@ -1,8 +1,5 @@
|
||||||
@import url('https://fonts.googleapis.com/css?family=Montserrat|Ubuntu');
|
@import url('https://fonts.googleapis.com/css?family=Montserrat|Ubuntu');
|
||||||
.Apper {
|
.Apper {
|
||||||
display: flex;
|
|
||||||
color: white;
|
|
||||||
height:100vh;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Apper__Aside {
|
.Apper__Aside {
|
||||||
|
@ -36,69 +33,35 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.PageSwitcher__Item:first-child {
|
.PageSwitcher__Item:first-child {
|
||||||
border-top-left-radius: 25px;
|
|
||||||
border-bottom-left-radius: 25px;
|
|
||||||
}
|
}
|
||||||
.PageSwitcher__Item:last-child {
|
.PageSwitcher__Item:last-child {
|
||||||
border-top-right-radius: 25px;
|
|
||||||
border-bottom-right-radius: 25px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormCenter {
|
.FormCenter {
|
||||||
margin-bottom: 100px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormTitle {
|
.FormTitle {
|
||||||
color: #000000;
|
|
||||||
font-weight: 300;
|
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormTitle__Link {
|
.FormTitle__Link {
|
||||||
color: #707C8B;
|
|
||||||
text-decoration: none;
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 1.7em;
|
|
||||||
margin: 0 10px;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormTitle__Link:first-child {
|
.FormTitle__Link:first-child {
|
||||||
margin-left: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormTitle__Link--Active {
|
.FormTitle__Link--Active {
|
||||||
color: #707c8b;
|
|
||||||
border-bottom: 1px solid #199087;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField {
|
.FormField {
|
||||||
margin-bottom: 40px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField__Label {
|
.FormField__Label {
|
||||||
display: block;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 1.25em;
|
|
||||||
color: #4C5D72;
|
|
||||||
text-align: start;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.FormField__Input {
|
.FormField__Input {
|
||||||
width: 85%;
|
|
||||||
background-color: transparent;
|
|
||||||
border: none;
|
|
||||||
color: #4C5D72;
|
|
||||||
outline: none;
|
|
||||||
border-bottom: 1px solid #445366;
|
|
||||||
font-size: .9em;
|
|
||||||
font-weight: 300;
|
|
||||||
padding-bottom: 10px;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField__Input::placeholder {
|
.FormField__Input::placeholder {
|
||||||
color: #616E7F;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField__Button {
|
.FormField__Button {
|
||||||
|
@ -113,29 +76,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField__Link {
|
.FormField__Link {
|
||||||
color: #66707D;
|
|
||||||
text-decoration: none;
|
|
||||||
display: inline-block;
|
|
||||||
padding-bottom: 5px;
|
|
||||||
margin-left: 12px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField__CheckboxLabel {
|
.FormField__CheckboxLabel {
|
||||||
color: #646F7D;
|
|
||||||
font-size: .9em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField__Checkbox {
|
.FormField__Checkbox {
|
||||||
position: relative;
|
|
||||||
top: 1.5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.FormField__TermsLink {
|
.FormField__TermsLink {
|
||||||
color: #646F7D;
|
|
||||||
border-bottom: 1px solid #199087;
|
|
||||||
text-decoration: none;
|
|
||||||
display: inline-block;
|
|
||||||
padding-bottom: 2px;
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue