Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log in and Signup pages added #142

Merged
merged 7 commits into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"node-sass": "^7.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.0"
},
"scripts": {
Expand Down
17 changes: 17 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from "react";
import Home from "./components/Home";
import Login from "./pages/LoginPage";
import Signup from "./pages/SignupPage";
import { Routes, Route } from "react-router-dom";

export default function App() {
return (
<>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need of this. :)

<Routes>
<Route exact path="/" element={<Home />}></Route>
<Route path="/login" element={<Login />}></Route>
<Route path="/signup" element={<Signup />}></Route>
</Routes>
</>
);
}
4 changes: 4 additions & 0 deletions src/components/Header/Header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import NavLink from "./_NavLink";
import {Link} from "react-router-dom";

const Header = ({ ChangePage, CurrentPage, Resume }) => {
return (
Expand All @@ -15,6 +16,9 @@ const Header = ({ ChangePage, CurrentPage, Resume }) => {
/>
))}
</ul>
<Link to="/login" className="btn btn-primary btn-sm col-1">
Login
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prettier 2 space indentation, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't git this one @praveenscience

</Link>
<a
href="https://rezyume.co/"
target="_blank"
Expand Down
File renamed without changes.
21 changes: 14 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./components/App";

import App from "./App";
import "./styles/App.scss";
import {
BrowserRouter as Router,
Routes,
Route,
Link,
BrowserRouter,
} from "react-router-dom";
import * as serviceWorker from "./serviceWorker";

ReactDOM.render(<App />, document.getElementById("root"));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
ReactDOM.render(
<Router>
<App />
</Router>,
document.getElementById("root")
);
serviceWorker.unregister();
38 changes: 38 additions & 0 deletions src/pages/LoginPage/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* .container{
background-color: #003100;
} */

.loginform {
background-color: #003100;
justify-content: center;
padding: 2rem;
text-align: center;
align-items: center;
height: 400px;
margin: 10rem;
}
.inputSubmit {
background-color: #0000ff;
color: white;
margin-left: 1rem;
border-radius: 10px;
width: 100px;
outline-width: 0;
margin-right: 20px;
}
.input {
padding-left: 5rem;
padding: 0.4rem;
margin: 1rem;
border-radius: 10px;
outline-width: 0;
width: 350px;
}
.Submit-form {
display: flex;
align-items: center;
justify-content: center;
}
h1 {
color: greenyellow;
}
41 changes: 41 additions & 0 deletions src/pages/LoginPage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from "react";
import "./index.css";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert to SCSS, and add it there.

import { Link } from "react-router-dom";

function Login() {
return (
<div className="container">
<div className="loginform">
<h1>Log In</h1>
<div>
<input
className="input"
type="email"
placeholder="Email"
autocomplete="off"
required
/>
</div>
<div>
<input
className="input"
type="password"
placeholder="Password"
autocomplete="off"
required
/>
</div>
<div className="Submit-form">
<div>
<input className="inputSubmit" type="submit" value="Login" />
</div>
<div>
<Link to="/Signup">New User ?</Link>
</div>
</div>
</div>
</div>
);
}

export default Login;
39 changes: 39 additions & 0 deletions src/pages/SignupPage/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* .container{
background-color: #003100;
} */

.loginform {
background-color: #003100;
justify-content: center;
padding: 2rem;
text-align: center;
align-items: center;
height: 400px;
margin: 10rem;
}
.inputSubmit {
background-color: #0000ff;
color: white;
margin-left: 1rem;
display: inline-block;
border-radius: 10px;
width: 100px;
outline-width: 0;
margin-right: 20px;
}
.input {
padding-left: 5rem;
padding: 0.4rem;
margin: 1rem;
border-radius: 10px;
outline-width: 0;
width: 350px;
}
.Submit-form {
display: flex;
align-items: center;
justify-content: center;
}
h1 {
color: greenyellow;
}
50 changes: 50 additions & 0 deletions src/pages/SignupPage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React from "react";
import "./index.css";
import { Link } from "react-router-dom";

function Signup() {
return (
<div className="container">
<div className="loginform">
<h1>Sign up</h1>
<div>
<input
className="input"
type="email"
placeholder="Email"
autocomplete="off"
required
/>
</div>
<div>
<input
className="input"
type="password"
placeholder="Password"
autocomplete="off"
required
/>
</div>
<div>
<input
className="input"
type="password"
placeholder="Confirm Password"
autocomplete="off"
required
/>
</div>
<div className="Submit-form">
<div>
<input className="inputSubmit" type="submit" value="Signup" />
</div>
<div>
<Link to="/login"> Already Registered?</Link>
</div>
</div>
</div>
</div>
);
}

export default Signup;