BLOG-14 Create not found page #23

Merged
zoe merged 1 commits from BLOG-14_custom_404_not_found_page into main 2025-01-19 22:00:50 +08:00
3 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ {
"plugins": ["prettier-plugin-tailwindcss", "@trivago/prettier-plugin-sort-imports"], "plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"],
"printWidth": 120, "printWidth": 120,
"tabWidth": 2, "tabWidth": 2,
"trailingComma": "all", "trailingComma": "all",

View File

@ -0,0 +1,16 @@
export default function NotFoundPage() {
return (
<div className="mx-auto flex min-h-[--content-height] max-w-screen-xl flex-col items-center justify-center px-4 md:px-6">
<div className="flex flex-row items-end gap-x-4 md:gap-x-6">
<h1 className="text-5xl font-extrabold text-gray-800 underline md:text-7xl">404</h1>
<h2 className="flex flex-row items-center gap-x-2 text-2xl font-bold md:gap-x-2.5 md:text-3xl">
<div className="h-7 w-1.5 bg-gray-800 md:h-9 md:w-2" />
<div className="rounded-md bg-blue-600 px-1 py-px md:px-1.5 md:py-0.5">
<span className="text-white">Not</span>
</div>
<span className="text-gray-800">Found.</span>
</h2>
</div>
</div>
);
}

View File

@ -4,7 +4,7 @@ export default function HomePage() {
return ( return (
<div className="mx-auto flex min-h-[--content-height] max-w-screen-xl flex-col justify-center gap-y-2.5 px-4 md:gap-y-8 md:px-6"> <div className="mx-auto flex min-h-[--content-height] max-w-screen-xl flex-col justify-center gap-y-2.5 px-4 md:gap-y-8 md:px-6">
<h2 className="text-3xl font-bold text-gray-800 md:text-6xl">Hello </h2> <h2 className="text-3xl font-bold text-gray-800 md:text-6xl">Hello </h2>
<h1 className="flex flex-row items-center gap-x-2 text-4xl font-bold text-gray-800 md:text-7xl"> <h1 className="flex flex-row items-center gap-x-2 text-4xl font-extrabold text-gray-800 md:text-7xl">
<span></span> <span></span>
<div className="rounded-lg bg-blue-600 px-1.5 py-1"> <div className="rounded-lg bg-blue-600 px-1.5 py-1">
<span className="text-white">Squid</span> <span className="text-white">Squid</span>