Skip to content

Commit

Permalink
add 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
nil1729 committed Sep 27, 2020
1 parent e6a6cfa commit 52c8a29
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 2 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,4 @@
"devDependencies": {
"gh-pages": "^3.1.0"
}

}
}
4 changes: 4 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Home from "./pages/Home/Home";
import Footer from "./components/Footer";
import COC from "./pages/COC/COC";
import Team from "./pages/Team/Team";
import NotFoundPage from "./components/NotFoundPage/NotFound";

const App = () => {
return (
Expand All @@ -30,6 +31,9 @@ const App = () => {
<Route exact path="/">
<Home />
</Route>
<Route exact path="*">
<NotFoundPage />
</Route>
</Switch>
</CSSTransition>
</TransitionGroup>
Expand Down
25 changes: 25 additions & 0 deletions src/components/NotFoundPage/NotFound.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import { Link } from "react-router-dom";
import { Container } from "react-bootstrap";

const NotFound = () => {
return (
<React.Fragment>
<Container fluid>
<Container>
<div className="main-content mx-auto" id="not-found-content">
<h2>404</h2>
<h4>Oops! Page Not Found</h4>
<p>
The page you are looking for does not exist. You may have mistyped
the address or the page may have moved.
</p>
<Link to="/">Back to Home Page</Link>
</div>
</Container>
</Container>
</React.Fragment>
);
};

export default NotFound;
47 changes: 47 additions & 0 deletions src/components/NotFoundPage/NotFound.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#not-found-content {
max-width: 600px;
text-align: center;
margin-bottom: 100px;

h2 {
font-size: 18vw;
color: $primary-blue;
line-height: 1em;
}
h4 {
position: relative;
font-size: 1.5em;
margin-bottom: 15px;
color: $black;
font-weight: 300;
display: inline-block;
}

p {
color: $github-button-black;
font-size: 1.2em;
}
a {
border-bottom: 3px solid $primary-blue;
color: $primary-blue;
display: inline-block;
font-size: 18px;
font-weight: 600;
margin: 5px;
text-decoration: none;
transition: all 0.3s ease;
&:hover {
border-bottom: 3px solid $link-blue;
color: $link-blue;
}
}
@media (max-width: 600px) {
margin-bottom: 50px;
p {
font-size: 1em;
}
a {
margin-top: 0px;
}
}
}
1 change: 1 addition & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
@import "./components/Twitter/Twitter.scss";
@import "./components/Footer/Footer.scss";
@import "./pages/COC/COC.scss";
@import "./components/NotFoundPage/NotFound.scss";

0 comments on commit 52c8a29

Please sign in to comment.