Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6492 surfin 404 #7056

Merged
merged 9 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/site/app/[locale]/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ErrorPage: FC<{ error: Error }> = ({ error }) => {

<main>
500
<h1 className="special -mt-4">
<h1 className="special -mt-4 text-center">
{t('layouts.error.internalServerError.title')}
</h1>
<p className="-mt-4 max-w-sm text-center text-lg">
Expand Down
20 changes: 12 additions & 8 deletions apps/site/app/[locale]/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@ const NotFoundPage: FC = () => {

<main>
404
<h1 className="special -mt-4">{t('layouts.error.notFound.title')}</h1>
<div className="my-4 flex items-center justify-center">
<Image
src="/static/images/node-mascot.svg"
alt="The Node.js mascot"
height={114.69}
width={100}
/>
<h1 className="special -mt-4 text-center">
{t('layouts.error.notFound.title')}
</h1>
<div className="my-4 flex h-[150px] items-center justify-center md:h-[300px]">
<div className="turtle motion-safe:animate-surf motion-reduce:animate-none">
bmuenzenmeyer marked this conversation as resolved.
Show resolved Hide resolved
<Image
src="/static/images/node-mascot.svg"
alt="The Node.js mascot"
height={114.69}
width={100}
bmuenzenmeyer marked this conversation as resolved.
Show resolved Hide resolved
/>
</div>
</div>
<p className="-mt-4 max-w-sm text-center text-lg">
{t('layouts.error.notFound.description')}
Expand Down
4 changes: 3 additions & 1 deletion apps/site/app/global-error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ const GlobalErrorPage: FC<{ error: Error }> = ({ error }) => {

<main>
500
<h1 className="special -mt-4">Internal Server Error</h1>
<h1 className="special -mt-4 text-center">
Internal Server Error
</h1>
<p className="-mt-4 max-w-sm text-center text-lg">
This page has thrown a non-recoverable error.
</p>
Expand Down
Binary file added apps/site/public/static/images/smoke.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions apps/site/styles/effects.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,34 @@ h1.special {
md:leading-[4rem]
md:-tracking-[0.06rem];
}

.turtle {
@apply animate-surf
absolute
z-10
translate-x-0
translate-y-0;
}

.turtle img {
@apply h-auto
w-24
md:w-48;
}

.turtle::after {
@apply absolute
-left-full
top-[20%]
-z-10
block
h-36
w-36
-rotate-90
select-none
bg-[url('/static/images/smoke.gif')]
opacity-[0.15]
content-['']
md:-left-1/2
md:top-1/2;
}
12 changes: 12 additions & 0 deletions apps/site/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ export default {
spacing: { '4.5': '1.125rem', '18': '4.5rem' },
aria: { current: 'current="page"' },
maxWidth: { '8xl': '95rem' },
animation: {
bmuenzenmeyer marked this conversation as resolved.
Show resolved Hide resolved
surf: 'surf 1s infinite ease-in-out',
},
keyframes: {
surf: {
'0%': { transform: 'translate(0, 0)' },
'25%': { transform: 'translate(0, 6px)' },
'50%': { transform: 'translate(0, -6px)' },
'75%': { transform: 'translate(0, 3px)' },
'100%': { transform: 'translate(0, 0)' },
},
},
},
},
darkMode: ['class', '[data-theme="dark"]'],
Expand Down
Loading