Skip to content

Commit

Permalink
designed 404 not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
kprime21 authored and redxzeta committed May 28, 2022
1 parent eaf8869 commit 04d3380
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 4 deletions.
76 changes: 76 additions & 0 deletions src/components/NotFound/NotFound.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.innerNotFound {
display: flex;
width: 100%;
justify-content: center;
align-items: center;
height: 80%;
}

.HoldAnimation {
width: 55%;
}

.HoldAnimation > img {
width: 100%;
}

.HoldText {
margin-left: 8vw;
margin-top: 50px;
width: 30%;
position: relative;
}

.HeaderText {
margin-bottom: 2rem;
}
.HeaderText > h1,
h4 {
text-align: center;
}

.pageList {
padding-left: 2em;
list-style-type: circle;
}

/* For smaller screens */
@media only screen and (max-width: 1024px) {
.innerNotFound {
flex-direction: column;
}

.HoldAnimation {
width: 70%;
}

.HoldText {
width: 60%;
margin: 0 auto;
}
}

@media only screen and (max-width: 768px) {
.pageList li {
margin-bottom: 0;
}
}

@media only screen and (max-width: 550px) {
.innerNotFound {
height: initial;
}

.HoldAnimation {
width: 90%;
}

.HoldText {
width: 100%;
padding: 0 1rem;
}

.pageList li {
margin-bottom: 0;
}
}
43 changes: 39 additions & 4 deletions src/components/NotFound/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,48 @@
import { Container, Image } from "react-bootstrap";
import { Link } from "react-router-dom";

import Dog from "../home/dog.jpg";
import "./NotFound.css";
import logo from "./NotFoundDog.svg";

export default function NotFound() {
return (
<Container className="d-flex flex-column justify-center align-items-center">
<Image src={Dog} rounded fluid />
<Container className="pawhub py-2">
<div className="innerNotFound">
<div className="HoldAnimation">
<Image src={logo} alt="page not found"></Image>
</div>
<div className="HoldText">
<div className="HeaderText">
<h1>Ruh Roh! 404 Error</h1>
<h4>Page Not Found</h4>
</div>
<p>The pets you&apos;re looking for are in another castle!</p>

<h1>Page Not Found</h1>
<p>
You either found a broken link or the content you were looking for
was removed. Sorry!
</p>

<p>Heres a couple of pages you might have been looking for:</p>
<ul className="pageList">
<li>
<Link to="/">HOME</Link>
</li>
<li>
<Link to="/pets">PETS</Link>
</li>
<li>
<Link to="/resources">RESOURCES</Link>
</li>
<li>
<Link to="/tips">TIPS</Link>
</li>
<li>
<Link to="/donate">DONATE</Link>
</li>
</ul>
</div>
</div>
</Container>
);
}
1 change: 1 addition & 0 deletions src/components/NotFound/NotFoundDog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/NotFound/custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module "*.svg" {
const content: any;
export default content;
}

0 comments on commit 04d3380

Please sign in to comment.