|
1 | 1 | import { Link } from "react-router"; |
| 2 | +import { HTHeader } from "./HTHeader"; |
| 3 | +import { HTFooter } from "./HTFooter"; |
2 | 4 |
|
3 | 5 | export default function ErrorPage({ msg }: { msg?: string }) { |
4 | 6 | return ( |
5 | | - <main className="relative grid min-h-screen place-items-center"> |
6 | | - {/* overlays */} |
7 | | - <div aria-hidden className="scanlines absolute inset-0" /> |
8 | | - <div aria-hidden className="vignette absolute inset-0" /> |
| 7 | + <div className="min-h-dvh flex flex-col"> |
| 8 | + <HTHeader /> |
9 | 9 |
|
10 | | - <div className="text-center"> |
11 | | - {/* Glitchy RGB title */} |
12 | | - <div className="relative inline-block select-none isolation-isolate"> |
13 | | - <h1 |
14 | | - className=" |
15 | | - relative text-3xl md:text-5xl font-extrabold tracking-tight |
16 | | - text-gray-100 |
17 | | - motion-safe:animate-[glitch_1.8s_steps(12,end)_infinite] |
18 | | - " |
19 | | - > |
20 | | - ERROR |
21 | | - {/* cyan layer */} |
22 | | - <span |
23 | | - aria-hidden |
| 10 | + <main id="main" className="flex-1 flex items-center justify-center px-6"> |
| 11 | + <div className="relative text-center"> |
| 12 | + {/* Glitchy title */} |
| 13 | + <div className="relative inline-block select-none isolation-isolate"> |
| 14 | + <h1 |
24 | 15 | className=" |
25 | | - absolute inset-0 text-cyan-300 mix-blend-screen opacity-95 |
26 | | - motion-safe:animate-[rgb_2.4s_ease-in-out_infinite] |
| 16 | + relative text-4xl md:text-6xl font-extrabold tracking-tight |
| 17 | + text-red-400 |
| 18 | + motion-safe:animate-[glitch_2s_steps(12,end)_infinite] |
27 | 19 | " |
28 | 20 | > |
29 | 21 | ERROR |
30 | | - </span> |
31 | | - {/* magenta layer */} |
32 | | - <span |
33 | | - aria-hidden |
34 | | - className=" |
35 | | - absolute inset-0 text-fuchsia-400 mix-blend-screen opacity-95 |
36 | | - -translate-x-[1.5px] translate-y-[0.8px] |
37 | | - motion-safe:animate-[rgb_2.4s_ease-in-out_infinite] |
38 | | - " |
39 | | - style={{ animationDelay: "0.15s" }} |
| 22 | + <span |
| 23 | + aria-hidden |
| 24 | + className="absolute inset-0 text-cyan-300 mix-blend-screen opacity-95 |
| 25 | + motion-safe:animate-[rgb_2.4s_ease-in-out_infinite]" |
| 26 | + > |
| 27 | + ERROR |
| 28 | + </span> |
| 29 | + <span |
| 30 | + aria-hidden |
| 31 | + className="absolute inset-0 text-fuchsia-400 mix-blend-screen opacity-95 |
| 32 | + -translate-x-[2px] translate-y-[1px] |
| 33 | + motion-safe:animate-[rgb_2.4s_ease-in-out_infinite]" |
| 34 | + style={{ animationDelay: "0.15s" }} |
| 35 | + > |
| 36 | + ERROR |
| 37 | + </span> |
| 38 | + </h1> |
| 39 | + </div> |
| 40 | + |
| 41 | + {/* Message */} |
| 42 | + {msg ? ( |
| 43 | + <pre |
| 44 | + role="alert" |
| 45 | + className="mx-auto mt-6 max-w-xl overflow-x-auto rounded-lg |
| 46 | + border border-red-700/70 bg-red-950/30 p-4 text-left |
| 47 | + font-mono text-xs md:text-sm text-red-200" |
40 | 48 | > |
41 | | - ERROR |
42 | | - </span> |
43 | | - </h1> |
44 | | - </div> |
| 49 | + {msg} |
| 50 | + </pre> |
| 51 | + ) : ( |
| 52 | + <p className="mt-6 text-base text-gray-300"> |
| 53 | + Something went sideways. Try again or head back home. |
| 54 | + </p> |
| 55 | + )} |
45 | 56 |
|
46 | | - {/* Message block (optional) */} |
47 | | - {msg ? ( |
48 | | - <pre |
49 | | - role="alert" |
50 | | - className=" |
51 | | - mx-auto mt-5 mb-6 max-w-xl overflow-x-auto rounded-lg |
52 | | - border border-red-700/70 bg-red-950/30 p-4 text-left |
53 | | - font-mono text-xs md:text-sm text-red-200 |
54 | | - " |
55 | | - > |
56 | | - {msg} |
57 | | - </pre> |
58 | | - ) : ( |
59 | | - <p className="mt-5 mb-6 text-sm md:text-base text-gray-300"> |
60 | | - Something went sideways. |
61 | | - </p> |
62 | | - )} |
| 57 | + {/* Actions */} |
| 58 | + <div className="mt-8 flex flex-wrap justify-center gap-3"> |
| 59 | + <Link |
| 60 | + to="/" |
| 61 | + className="rounded-md border border-gray-600/70 px-4 py-2 |
| 62 | + text-sm font-semibold text-gray-100 |
| 63 | + hover:bg-gray-800/70 hover:border-gray-500 |
| 64 | + focus:outline-none focus:ring-2 focus:ring-indigo-400 |
| 65 | + transition-colors" |
| 66 | + > |
| 67 | + Return Home |
| 68 | + </Link> |
| 69 | + <Link |
| 70 | + to="/support" |
| 71 | + className="rounded-md border border-gray-600/70 px-4 py-2 |
| 72 | + text-sm font-semibold text-gray-100 |
| 73 | + hover:bg-gray-800/70 hover:border-gray-500 |
| 74 | + focus:outline-none focus:ring-2 focus:ring-indigo-400 |
| 75 | + transition-colors" |
| 76 | + > |
| 77 | + Contact Support |
| 78 | + </Link> |
| 79 | + </div> |
| 80 | + </div> |
| 81 | + </main> |
63 | 82 |
|
64 | | - {/* Action */} |
65 | | - <Link |
66 | | - to="/" |
67 | | - className=" |
68 | | - inline-flex items-center justify-center gap-2 |
69 | | - rounded-md border border-gray-600/70 px-4 py-2 |
70 | | - text-sm font-semibold text-gray-100 |
71 | | - hover:bg-gray-800/70 hover:border-gray-500 |
72 | | - focus:outline-none focus:ring-2 focus:ring-indigo-400 |
73 | | - transition-colors |
74 | | - " |
75 | | - > |
76 | | - Return Home |
77 | | - </Link> |
78 | | - </div> |
79 | | - </main> |
| 83 | + <HTFooter /> |
| 84 | + </div> |
80 | 85 | ); |
81 | 86 | } |
0 commit comments