Skip to content

Commit a57fc7c

Browse files
committed
404 pg
1 parent 691e05b commit a57fc7c

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

src/pages/404.jsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
import { PageContain, PageContent, PageSection } from "../styled/404.styled";
2+
13
const ErrorPage = () => {
2-
return <div>Error Page</div>;
4+
return (
5+
<PageSection>
6+
<PageContain>
7+
<PageContent>
8+
<h1>Error 404</h1>
9+
<p>The page you are looking for could not be found</p>
10+
</PageContent>
11+
</PageContain>
12+
</PageSection>
13+
);
314
};
415

516
export default ErrorPage;

src/styled/404.styled.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import styled from "styled-components";
2+
3+
export const PageSection = styled.div``;
4+
export const PageContain = styled.div`
5+
display: table;
6+
width: 100%;
7+
height: 100vh;
8+
text-align: center;
9+
`;
10+
export const PageContent = styled.div`
11+
display: table-cell;
12+
vertical-align: middle;
13+
14+
h1 {
15+
font-size: clamp(1.6rem, 10vw, 3.5rem);
16+
display: inline-block;
17+
padding-right: 12px;
18+
animation: type 0.5s alternate infinite;
19+
20+
@keyframes type {
21+
from {
22+
box-shadow: inset -3px 0px 0px #888;
23+
}
24+
to {
25+
box-shadow: inset -3px 0px 0px transparent;
26+
}
27+
}
28+
}
29+
p {
30+
font-size: clamp(1rem, 3vw, 1.5rem);
31+
}
32+
`;

0 commit comments

Comments
 (0)