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

add 404 page #225

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
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";