Skip to content

Commit

Permalink
feat: add general 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed Jun 2, 2023
1 parent 74249f9 commit 0ca2f10
Show file tree
Hide file tree
Showing 4 changed files with 487 additions and 176 deletions.
34 changes: 34 additions & 0 deletions app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
'use client'

import Spline from '@splinetool/react-spline'
import { motion } from 'framer-motion'
import Link from 'next/link'

import { url } from '~/lib'

export default function NotFoundPage() {
return (
<main className="h-screen">
<div className="absolute inset-0 h-full w-full">
<Spline scene={url('macbook.splinecode').href} />
</div>

<div className="pointer-events-none absolute inset-0 flex h-full w-full flex-col items-center justify-center">
<motion.h1
className="pointer-events-none select-none text-[35vmin] font-bold text-white mix-blend-overlay"
initial={{ opacity: 0, y: 30 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.3, delay: 0.3 }}
>
404
</motion.h1>
<Link
href="/"
className="pointer-events-auto select-none text-xl font-bold text-white mix-blend-difference hover:underline"
>
返回主页
</Link>
</div>
</main>
)
}
20 changes: 12 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@hookform/resolvers": "^3.1.0",
"@mdx-js/loader": "^2.3.0",
"@planetscale/database": "^1.7.0",
"@portabletext/react": "^3.0.0",
"@portabletext/react": "^3.0.2",
"@radix-ui/react-hover-card": "^1.0.6",
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-tooltip": "^1.0.6",
Expand All @@ -38,17 +38,21 @@
"@react-email/text": "^0.0.5",
"@sanity/image-url": "^1.0.2",
"@sanity/ui": "^1.3.3",
"@sanity/vision": "^3.11.3",
"@sanity/vision": "^3.11.5",
"@splinetool/loader": "^0.9.354",
"@splinetool/r3f-spline": "^1.0.2",
"@splinetool/react-spline": "^2.2.6",
"@splinetool/runtime": "^0.9.354",
"@upstash/ratelimit": "^0.4.3",
"@upstash/redis": "^1.20.6",
"@upstash/redis": "^1.21.0",
"@vercel/analytics": "^1.0.1",
"@vercel/edge-config": "^0.2.0",
"@vercel/edge-config": "^0.2.1",
"@zolplay/react": "^0.5.1",
"@zolplay/utils": "^1.3.4",
"cheerio": "1.0.0-rc.12",
"dayjs": "^1.11.7",
"dotenv": "^16.1.3",
"drizzle-orm": "^0.26.3",
"drizzle-orm": "^0.26.5",
"edge-cors": "^0.2.1",
"framer-motion": "^10.12.16",
"jotai": "^2.1.0",
Expand All @@ -66,7 +70,7 @@
"reading-time": "^1.5.0",
"resend": "^0.15.1",
"rss": "^1.2.2",
"sanity": "^3.11.3",
"sanity": "^3.11.5",
"zod": "^3.21.4",
"zustand": "^4.3.8"
},
Expand All @@ -93,7 +97,7 @@
"prettier-plugin-packagejson": "^2.4.3",
"prettier-plugin-tailwindcss": "^0.3.0",
"tailwindcss": "^3.3.2",
"turbo": "^1.9.9",
"typescript": "5.1.0-dev.20230515"
"turbo": "^1.10.1",
"typescript": "^5.1.3"
}
}
Loading

0 comments on commit 0ca2f10

Please sign in to comment.