-
Notifications
You must be signed in to change notification settings - Fork 3
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 #41 from Redot-Engine/chore/404-page-improvements
Enhance NotFound Page Layout
- Loading branch information
Showing
34 changed files
with
650 additions
and
119 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,103 @@ | ||
"use client"; | ||
|
||
import { useTranslations } from "next-intl"; | ||
import { Button } from "@/components/ui/button"; | ||
import Link from "next/link"; | ||
import { Header } from "@/components/Header"; | ||
import { Footer } from "@/components/Footer"; | ||
import Image from "next/image"; | ||
import { | ||
IconArrowLeft, | ||
IconBook, | ||
IconCube, | ||
IconMessages, | ||
IconPointFilled, | ||
} from "@tabler/icons-react"; | ||
import { Separator } from "@/components/ui/separator"; | ||
import React from "react"; | ||
import { links } from "@/constants/links"; | ||
import { useRouter } from "next/navigation"; | ||
import { SectionLink } from "@/components/SectionLink"; | ||
|
||
export const runtime = "edge"; | ||
|
||
export default function NotFound() { | ||
const router = useRouter(); | ||
const t = useTranslations("notFound"); | ||
|
||
return ( | ||
<section className="flex min-h-screen flex-col"> | ||
<Header /> | ||
<div className="flex-grow overflow-x-clip bg-gradient-to-b from-[#ffffff] to-[#FFD2D2] py-32"> | ||
<div className="mx-auto max-w-[540px]"> | ||
<div className="flex flex-col items-center justify-center gap-4"> | ||
<Image | ||
src="https://image.redotengine.org/redotchan.png" | ||
alt="Redotchan" | ||
width={160} | ||
height={160} | ||
/> | ||
<div className="flex flex-col"> | ||
<h2 className="mt-5 text-center text-4xl font-bold tracking-tighter md:text-[54px] md:leading-[60px]"> | ||
{t("title")} | ||
</h2> | ||
<p className="mt-5 text-center text-xl tracking-tighter text-black/60 md:text-[22px] md:leading-[30px]"> | ||
{t("description")} | ||
</p> | ||
<div className="relative dark:bg-black"> | ||
<div className="absolute inset-0 z-0 flex h-[25rem] items-center justify-center bg-white bg-grid-black/[0.1] dark:bg-black dark:bg-grid-white/[0.1]"> | ||
{/* Radial gradient for the container to give a faded look */} | ||
<div className="pointer-events-none absolute inset-0 flex items-center justify-center bg-white [mask-image:radial-gradient(ellipse_at_center,transparent_20%,black)] dark:bg-black"></div> | ||
</div> | ||
<section className="relative z-10"> | ||
<Header /> | ||
<div className="px-5 py-24"> | ||
<div className="flex flex-col items-center justify-center gap-16"> | ||
<div className="mx-auto flex max-w-[768px] flex-col text-center"> | ||
<div className="space-y-12"> | ||
<div className="space-y-6"> | ||
<div className="flex flex-col items-center gap-4"> | ||
<div className="flex h-8 w-fit items-center gap-2 rounded-md border border-input bg-background px-2 text-sm font-medium"> | ||
<IconPointFilled className="h-4 w-4 text-rose-600" /> | ||
{t("code")} | ||
</div> | ||
<h2 className="text-4xl font-bold tracking-tighter text-zinc-900 dark:text-white md:text-6xl"> | ||
{t("title")} | ||
</h2> | ||
</div> | ||
<p className="text-lg text-zinc-500 dark:text-zinc-400 md:text-xl"> | ||
{t("description")} | ||
</p> | ||
</div> | ||
|
||
<div className="flex flex-col justify-center gap-3 md:flex-row"> | ||
<Button | ||
size="lg" | ||
variant="outline" | ||
onClick={() => router.back()} | ||
asChild | ||
> | ||
<Link href="/"> | ||
<IconArrowLeft /> | ||
{t("goBack")} | ||
</Link> | ||
</Button> | ||
<Button size="lg" asChild> | ||
<Link href="/">{t("goHome")}</Link> | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="mx-auto flex max-w-[560px] flex-col gap-5 sm:w-[560px]"> | ||
<Separator /> | ||
<SectionLink | ||
icon={<IconCube className="h-6 w-6" />} | ||
href={links.documentation} | ||
title={t("documentation.title")} | ||
description={t("documentation.description")} | ||
/> | ||
|
||
<Separator /> | ||
<SectionLink | ||
icon={<IconBook className="h-6 w-6" />} | ||
href="/blog" | ||
title={t("ourBlog.title")} | ||
description={t("ourBlog.description")} | ||
/> | ||
|
||
<Separator /> | ||
<SectionLink | ||
icon={<IconMessages className="h-6 w-6" />} | ||
href="/contact" | ||
title={t("contactUs.title")} | ||
description={t("contactUs.description")} | ||
/> | ||
</div> | ||
<Button asChild> | ||
<Link href="/">{t("goBack")}</Link> | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
<Footer /> | ||
</section> | ||
<Footer /> | ||
</section> | ||
</div> | ||
); | ||
} |
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,36 @@ | ||
import { IconArrowRight } from "@tabler/icons-react"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
|
||
interface SectionLinkProps { | ||
readonly href: string; | ||
readonly icon: React.ReactNode; | ||
readonly title: string; | ||
readonly description: string; | ||
} | ||
|
||
export const SectionLink = ({ | ||
href, | ||
icon, | ||
title, | ||
description, | ||
}: Readonly<SectionLinkProps>) => ( | ||
<Link href={href}> | ||
<div className="group flex w-full flex-row items-center justify-between gap-5"> | ||
<div className="flex flex-col gap-5 md:flex-row"> | ||
<div> | ||
<div className="border-zinc-250 flex h-12 w-12 items-center justify-center rounded-lg border"> | ||
{icon} | ||
</div> | ||
</div> | ||
<div className="flex w-full flex-col gap-2"> | ||
<h3 className="text-xl font-medium text-zinc-900 dark:text-white"> | ||
{title} | ||
</h3> | ||
<p className="text-zinc-500 dark:text-zinc-400">{description}</p> | ||
</div> | ||
</div> | ||
<IconArrowRight className="text-zinc-400 transition-all duration-300 group-hover:text-zinc-900" /> | ||
</div> | ||
</Link> | ||
); |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.