-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #321 from bounswe/feature/FE-not-found-page
Add not found page
- Loading branch information
Showing
4 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// src/components/NotFound.js | ||
import React from "react"; | ||
import { Link } from "react-router-dom"; | ||
import "../../styles/NotFound.css"; | ||
import notfoundbear from "../../assets/notfound-bear.png"; | ||
|
||
const NotFound = () => { | ||
return ( | ||
<div className="not-found-container"> | ||
<div className="error-404"> | ||
<h1 className="animated-bounce">404</h1> | ||
</div> | ||
<p className="error-message"> | ||
Oops! It looks like you are lost. Let the bear help you find your way. | ||
</p> | ||
<div className="notfoundbear"> | ||
<img | ||
src={notfoundbear} | ||
alt="Not Found Bear" | ||
className="notfoundbear-img" | ||
/> | ||
</div> | ||
<Link to="/" className="back-home"> | ||
Take me home | ||
</Link> | ||
</div> | ||
); | ||
}; | ||
|
||
export default NotFound; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
.not-found-container { | ||
text-align: center; | ||
margin-top: 50px; | ||
padding: 20px; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
.error-404 h1 { | ||
font-size: 10rem; | ||
margin: 0; | ||
color: var(--color-error-500); | ||
} | ||
|
||
.error-message { | ||
font-size: 1.5rem; | ||
color: var(--color-neutral-600); | ||
margin-top: -20px; | ||
animation: fadeIn 2s ease-in-out; | ||
} | ||
|
||
.notfoundbear { | ||
position: relative; | ||
margin: 50px auto; | ||
width: 100px; | ||
} | ||
|
||
.notfoundbear-img { | ||
width: 100%; | ||
animation: float 3s ease-in-out infinite; | ||
} | ||
|
||
.back-home { | ||
display: inline-block; | ||
padding: 10px 20px; | ||
margin-top: 20px; | ||
color: var(--color-neutral-white); | ||
background-color: var(--color-primary-500); | ||
border-radius: 5px; | ||
text-decoration: none; | ||
font-weight: bold; | ||
transition: background-color 0.3s ease; | ||
} | ||
|
||
.back-home:hover { | ||
background-color: var(--color-primary-600); | ||
} | ||
|
||
@keyframes float { | ||
0% { | ||
transform: translateY(0); | ||
} | ||
50% { | ||
transform: translateY(-20px); | ||
} | ||
100% { | ||
transform: translateY(0); | ||
} | ||
} | ||
|
||
.animated-bounce { | ||
animation: bounce 1.5s infinite; | ||
} | ||
|
||
@keyframes bounce { | ||
0%, 100% { | ||
transform: translateY(0); | ||
} | ||
50% { | ||
transform: translateY(-10px); | ||
} | ||
} | ||
|
||
@keyframes fadeIn { | ||
0% { | ||
opacity: 0; | ||
} | ||
100% { | ||
opacity: 1; | ||
} | ||
} |