parent
cb53190b25
commit
36f751a69f
@ -0,0 +1,41 @@
|
|||||||
|
.auth-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.auth-inner {
|
||||||
|
width: 450px;
|
||||||
|
margin: auto;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 14px 60px rgba(34, 35, 58, 0.1);
|
||||||
|
padding: 40px 55px 45px 55px;
|
||||||
|
border-radius: 15px;
|
||||||
|
transition: all .3s;
|
||||||
|
}
|
||||||
|
.auth-wrapper .form-control:focus {
|
||||||
|
border-color: #167bff;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
.auth-wrapper h3 {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 1;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
.custom-control-label {
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.forgot-password,
|
||||||
|
.forgot-password a {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #7f7d7d;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.forgot-password a {
|
||||||
|
color: #167bff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#remember-me {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
import React, { Component } from 'react'
|
||||||
|
import { Container } from 'react-bootstrap'
|
||||||
|
import './Login.css'
|
||||||
|
|
||||||
|
export default function Login() {
|
||||||
|
return (
|
||||||
|
<div className="auth-wrapper">
|
||||||
|
<div className="auth-inner">
|
||||||
|
<form>
|
||||||
|
<h3>Sign In</h3>
|
||||||
|
<div className="mb-3">
|
||||||
|
<label>Email address</label>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
className="form-control"
|
||||||
|
placeholder="Enter email"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="mb-3">
|
||||||
|
<label>Password</label>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
className="form-control"
|
||||||
|
placeholder="Enter password"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="mb-3">
|
||||||
|
<div className="custom-control custom-checkbox">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
className="custom-control-input"
|
||||||
|
id="customCheck1"
|
||||||
|
/>
|
||||||
|
<label id="remember-me" className="custom-control-label" htmlFor="customCheck1">
|
||||||
|
Remember me
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="d-grid">
|
||||||
|
<button type="submit" className="btn btn-primary mb-3">
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<p className="forgot-password">
|
||||||
|
Don't have an account? <a href="/signup">sign up</a>
|
||||||
|
</p>
|
||||||
|
<p className="forgot-password">
|
||||||
|
Forgot <a href="#">password?</a>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
import './Login.css'
|
||||||
|
import React, { Component } from 'react'
|
||||||
|
|
||||||
|
export default function SignUp() {
|
||||||
|
return (
|
||||||
|
<div className="auth-wrapper">
|
||||||
|
<div className="auth-inner">
|
||||||
|
<form>
|
||||||
|
<h3>Sign Up</h3>
|
||||||
|
<div className="mb-3">
|
||||||
|
<label>First name</label>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className="form-control"
|
||||||
|
placeholder="First name"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="mb-3">
|
||||||
|
<label>Last name</label>
|
||||||
|
<input type="text" className="form-control" placeholder="Last name" />
|
||||||
|
</div>
|
||||||
|
<div className="mb-3">
|
||||||
|
<label>Email address</label>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
className="form-control"
|
||||||
|
placeholder="Enter email"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="mb-3">
|
||||||
|
<label>Password</label>
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
className="form-control"
|
||||||
|
placeholder="Enter password"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="d-grid">
|
||||||
|
<button type="submit" className="btn btn-primary mb-3">
|
||||||
|
Sign Up
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<p className="forgot-password text-right">
|
||||||
|
Already registered? <a href="/login">log in</a>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
export default function checkLogin() {
|
||||||
|
var cookies = document.cookie.split(';');
|
||||||
|
for (var i = 0; i < cookies.length; i++) {
|
||||||
|
var cookie = cookies[i].trim();
|
||||||
|
if (cookie.indexOf('session=') === 0) {
|
||||||
|
// The "session" cookie exists
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// The "session" cookie doesn't exist
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Loading…
Reference in new issue