|
| 1 | +import Image from "next/image"; |
| 2 | +import { hackyPeeking } from "@/assets/images"; |
| 3 | +import Link from "next/link"; |
| 4 | +import { getServerSession } from "next-auth"; |
| 5 | +import authOptions from "./api/auth/[...nextauth]/authOptions"; |
| 6 | +import Toolbar from "@/components/Toolbar"; |
| 7 | +import BottomNavbar from "@/components/BottomNavbar"; |
| 8 | + |
| 9 | +export default async function NotFound() { |
| 10 | + const session = await getServerSession(authOptions); |
| 11 | + |
| 12 | + return ( |
| 13 | + <div |
| 14 | + className={`relative overflow-hidden min-h-screen flex flex-col ${ |
| 15 | + session ? "bg-gray-100 text-black" : "bg-white" |
| 16 | + }`} |
| 17 | + > |
| 18 | + {/* Background accents */} |
| 19 | + <div className="pointer-events-none absolute inset-0 -z-10"> |
| 20 | + <div className="absolute -top-20 -left-20 h-72 w-72 rounded-full bg-sinfo-primary/10 blur-3xl animate-blob" /> |
| 21 | + <div className="absolute top-1/4 -right-10 h-64 w-64 rounded-full bg-sinfo-secondary/10 blur-3xl animate-blob [animation-delay:800ms]" /> |
| 22 | + <div className="absolute bottom-0 left-1/3 h-64 w-64 rounded-full bg-sinfo-quaternary/10 blur-3xl animate-blob [animation-delay:1500ms]" /> |
| 23 | + </div> |
| 24 | + |
| 25 | + {session ? <Toolbar /> : null} |
| 26 | + |
| 27 | + <main className="flex-1 flex items-center justify-center"> |
| 28 | + <section className="w-full mx-auto max-w-5xl flex flex-col items-center justify-center gap-4 px-4 py-16 text-center"> |
| 29 | + <h1 className="relative text-7xl font-extrabold leading-none tracking-tight sm:text-8xl"> |
| 30 | + <span className="text-sinfo-primary">404</span> |
| 31 | + <span className="sr-only">Page not found</span> |
| 32 | + </h1> |
| 33 | + |
| 34 | + <p className="max-w-xl text-balance text-base text-gray-500 sm:text-lg leading-relaxed"> |
| 35 | + Oops, this page got a bit lost. |
| 36 | + <br /> While we are working on it, here's Hacky peeking to say |
| 37 | + hi. |
| 38 | + </p> |
| 39 | + |
| 40 | + {/* Static Hacky placed just above the CTA so it looks like he's holding the button */} |
| 41 | + <div className="relative mx-auto mt-6 -mb-4 flex items-end justify-center"> |
| 42 | + <Link href="/" className="cursor-pointer"> |
| 43 | + <Image |
| 44 | + src={hackyPeeking} |
| 45 | + alt="Hacky peeking" |
| 46 | + priority |
| 47 | + // keep origin-bottom so any transforms (if later added) pivot from feet |
| 48 | + className="origin-bottom w-48 sm:w-56" |
| 49 | + sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw" |
| 50 | + /> |
| 51 | + </Link> |
| 52 | + </div> |
| 53 | + |
| 54 | + <div className="mt-0 flex items-center justify-center gap-3 relative z-10"> |
| 55 | + <Link |
| 56 | + href="/" |
| 57 | + className="button-primary text-base font-medium px-10 py-3.5 rounded-full shadow-lg !rounded-full" |
| 58 | + > |
| 59 | + Go back home |
| 60 | + </Link> |
| 61 | + </div> |
| 62 | + </section> |
| 63 | + </main> |
| 64 | + |
| 65 | + {session ? <BottomNavbar /> : null} |
| 66 | + </div> |
| 67 | + ); |
| 68 | +} |
0 commit comments