Skip to content

Commit b744fe9

Browse files
committed
Create not found custom page
1 parent b1141a6 commit b744fe9

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

app/not-found.tsx

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import Link from "next/link";
2+
import { Metadata } from "next";
3+
4+
export const metadata: Metadata = {
5+
title: "404 Not Found",
6+
};
7+
8+
export default function NotFound() {
9+
return (
10+
<div className="py-16 w-full min-h-screen flex justify-center md:items-center bg-white">
11+
<div className="mx-auto max-w-xl lg:max-w-4xl flex flex-col lg:flex-row">
12+
<div className="relative px-5 lg:border-r-2 border-gray-100">
13+
<p className="absolute -top-3 md:top-0 left-10 md:left-20 text-base md:text-4xl text-indigo-600 font-bold uppercase">
14+
Error
15+
</p>
16+
<p className="text-7xl md:text-10xl text-gray-700 font-extrabold tracking-wider">404</p>
17+
</div>
18+
19+
<div className="px-5">
20+
<p className="text-3xl md:text-5xl text-gray-700 font-bold tracking-wide">
21+
Page Not Found
22+
</p>
23+
<p className="mt-4 text-sm md:text-base text-gray-500 font-medium">
24+
The content you’re looking for doesn’t exist. Either it was removed, or you mistyped the
25+
link. <br />
26+
<br />
27+
Sorry about that! Please visit our homepage to get where you need to go.
28+
</p>
29+
<Link
30+
href="/"
31+
className="mt-10 relative inline-flex items-center px-7 py-3.5 rounded border border-transparent bg-indigo-600 md:text-lg text-white font-medium hover:bg-indigo-700"
32+
>
33+
Go back to Homepage
34+
</Link>
35+
</div>
36+
</div>
37+
</div>
38+
);
39+
}

tailwind.config.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import type { Config } from "tailwindcss"
33
const config = {
44
darkMode: ["class"],
55
content: [
6-
'./pages/**/*.{ts,tsx}',
7-
'./components/**/*.{ts,tsx}',
8-
'./app/**/*.{ts,tsx}',
9-
'./src/**/*.{ts,tsx}',
10-
],
6+
"./pages/**/*.{ts,tsx}",
7+
"./components/**/*.{ts,tsx}",
8+
"./app/**/*.{ts,tsx}",
9+
"./src/**/*.{ts,tsx}",
10+
],
1111
prefix: "",
1212
theme: {
1313
container: {
@@ -72,9 +72,12 @@ const config = {
7272
"accordion-down": "accordion-down 0.2s ease-out",
7373
"accordion-up": "accordion-up 0.2s ease-out",
7474
},
75+
fontSize: {
76+
"10xl": ["12rem", { lineHeight: "1" }],
77+
},
7578
},
7679
},
7780
plugins: [require("tailwindcss-animate")],
78-
} satisfies Config
81+
} satisfies Config;
7982

8083
export default config

0 commit comments

Comments
 (0)