Skip to content

Commit 1e9a237

Browse files
authored
fixes, add cooler 404 page (#535)
* fixes, add cooler 404 page * remove unused imports and change function name
1 parent 8e0cd1c commit 1e9a237

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed

src/pages/404.tsx

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/*
2+
* 🐾 @noel/floofy.dev: Source code for floofy.dev and Noel's portfolio, a professional side of myself.
3+
* Copyright (c) 2018-2022 Noel
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
* SOFTWARE.
22+
*/
23+
24+
/* eslint-disable camelcase */
25+
26+
import {
27+
Container,
28+
Center,
29+
Heading,
30+
Text,
31+
} from '@chakra-ui/react';
32+
33+
import { DateTime } from 'luxon';
34+
import Head from 'next/head';
35+
36+
export default function NotFound() {
37+
const birthday = DateTime.fromJSDate(new Date(2004, 2, 24));
38+
const now = DateTime.now();
39+
const age = Math.floor(now.diff(birthday, ['years']).years);
40+
41+
return (
42+
<>
43+
<Head>
44+
<title>404 | Chris 🌺</title>
45+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
46+
<meta name="viewport" content="width=device-width, initial-scale=1" />
47+
<meta
48+
name="description"
49+
content={`${age} year old developer tinkering with code, and sometimes it works! ପ(๑•ᴗ•๑)ଓ ♡`}
50+
/>
51+
<meta name="theme-color" content="#FF69BD" />
52+
<meta
53+
property="og:description"
54+
content={`${age} year old developer tinkering with code, and sometimes it works! ପ(๑•ᴗ•๑)ଓ ♡`}
55+
/>
56+
<meta property="og:title" content="Chris 🌺" />
57+
<meta property="og:image" content="https://cdn.floofy.dev/images/August.png" />
58+
<meta property="og:type" content="website" />
59+
<meta property="og:url" content="https://floofy.dev" />
60+
<meta name="language" content="English" />
61+
<meta name="keywords" content="august, auguwu, noel, noelware" />
62+
</Head>
63+
64+
<Container maxW={{ lg: '7xl', base: '3xl' }} rowGap="1em">
65+
<Center maxW="7xl" mt="2em" flexDirection="column" rowGap="1em" textAlign="center">
66+
<Heading as="h1" size="2xl">
67+
404
68+
</Heading>
69+
70+
<Text fontSize="x-large">
71+
Page Not Found
72+
</Text>
73+
</Center>
74+
</Container>
75+
</>
76+
);
77+
}

src/pages/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,13 @@ export default function MainPage() {
120120
<meta property="og:image" content="https://cdn.floofy.dev/images/August.png" />
121121
<meta property="og:type" content="website" />
122122
<meta property="og:url" content="https://floofy.dev" />
123+
<meta name="language" content="English" />
124+
<meta name="keywords" content="august, auguwu, noel, noelware" />
123125
</Head>
124126

125127
<Container maxW={{ lg: '7xl', base: '3xl' }} rowGap="1em">
126128
<Center maxW="7xl" mt="2em" flexDirection="column" rowGap="1em" textAlign="center">
127-
<Avatar src="https://cdn.floofy.dev/images/August.png" width="185px" height="185px" draggable="false">
129+
<Avatar src="https://cdn.floofy.dev/images/August.png" width="185px" height="185px" draggable="false" name="August">
128130
<AvatarBadge boxSize="50px" bg={statusColor} mb="0.95em" />
129131
</Avatar>
130132

0 commit comments

Comments
 (0)