Skip to content

Commit 8297df4

Browse files
committed
WIP improving the 404 page
1 parent be7790b commit 8297df4

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed
16.5 KB
Loading

apps/webapp/app/components/ErrorDisplay.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import { HomeIcon } from "@heroicons/react/20/solid";
12
import { isRouteErrorResponse, useRouteError } from "@remix-run/react";
3+
import { friendlyErrorDisplay } from "~/utils/httpErrors";
4+
import logoGlow from "../assets/images/logo-glow.png";
25
import { LinkButton } from "./primitives/Buttons";
36
import { Header1, Header3 } from "./primitives/Headers";
4-
import { friendlyErrorDisplay } from "~/utils/httpErrors";
57

68
type ErrorDisplayOptions = {
79
button?: {
@@ -39,11 +41,20 @@ type DisplayOptionsProps = {
3941

4042
export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
4143
return (
42-
<div className="p-4">
43-
<Header1 className="mb-4 border-b border-charcoal-800 pb-4">{title}</Header1>
44+
<div className="relative mt-32 flex flex-col items-center gap-6">
45+
<div className="pointer-events-none absolute left-1/2 top-[220px] z-20 w-[350px] -translate-x-1/2 animate-[ping-pong-width_10s_ease-in-out_infinite]">
46+
<img src={logoGlow} className="h-full w-full object-contain" />
47+
</div>
48+
<div className="pointer-events-none absolute left-1/2 top-[230px] z-10 h-[70px] w-[350px] -translate-x-1/2 bg-background-dimmed" />
49+
<iframe
50+
src="https://my.spline.design/rotatinglogo-dd8c81cb0ec1b9d7d09a7b473b2992e2/"
51+
width="200px"
52+
height="300px"
53+
/>
54+
<Header1>{title}</Header1>
4455
{message && <Header3>{message}</Header3>}
45-
<LinkButton to={button ? button.to : "/"} variant="primary/medium" className="mt-8">
46-
{button ? button.title : "Home"}
56+
<LinkButton to={button ? button.to : "/"} variant="primary/medium" LeadingIcon={HomeIcon}>
57+
{button ? button.title : "Go to homepage"}
4758
</LinkButton>
4859
</div>
4960
);

apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function ErrorBoundary() {
100100
return org ? (
101101
<RouteErrorDisplay button={{ title: org.title, to: organizationPath(org) }} />
102102
) : (
103-
<RouteErrorDisplay button={{ title: "Home", to: "/" }} />
103+
<RouteErrorDisplay button={{ title: "Go to homepage", to: "/" }} />
104104
);
105105
}
106106

apps/webapp/tailwind.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,16 @@ module.exports = {
251251
"0%": { "background-position": "0px" },
252252
"100%": { "background-position": "8px" },
253253
},
254+
"ping-pong-width": {
255+
"0%, 100%": { width: "500px", blur: "1000px", opacity: "0" },
256+
"50%": { width: "320px", blur: "0px", opacity: "1" },
257+
},
254258
},
255259
animation: {
256260
"accordion-down": "accordion-down 0.2s ease-out",
257261
"accordion-up": "accordion-up 0.2s ease-out",
258262
"tile-scroll": "tile-move 0.5s infinite linear",
263+
"ping-pong-width": "ping-pong-width 10s ease-in-out infinite",
259264
},
260265
backgroundImage: {
261266
"gradient-radial": "radial-gradient(closest-side, var(--tw-gradient-stops))",

0 commit comments

Comments
 (0)