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

Not Found Page #60

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@next/mdx": "^15.1.3",
"@tailwindcss/typography": "^0.5.15",
"@types/mdx": "^2.0.13",
"gsap": "^3.12.5",
JITESH-KUMAR05 marked this conversation as resolved.
Show resolved Hide resolved
"next": "15.0.1",
"react": "19.0.0-rc-69d4b800-20241021",
"react-dom": "19.0.0-rc-69d4b800-20241021",
Expand Down
68 changes: 68 additions & 0 deletions src/app/not-found.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
"use client";

import { useEffect } from 'react';
import gsap from 'gsap';
import { ASSETS } from '@/conference';
import Link from 'next/link';

export default function NotFound() {
useEffect(() => {
const grid = document.querySelector('.grid');
const rows = 2;
const cols = 2;
for (let row = 0; row < rows; row++) {
for (let col = 0; col < cols; col++) {
const square = document.createElement('div');
square.className = 'bg-orange-200 rounded-lg overflow-hidden';
square.style.width = '300px'; // Width is twice the height
square.style.height = '150px'; // Height
const img = document.createElement('img');
img.src = ASSETS.logoUrl;
img.className = 'h-full w-full object-cover';
img.alt = 'Logo';
square.appendChild(img);
grid.appendChild(square);
}
}

gsap.from('.grid div', {
scale: 0,
opacity: 0,
duration: 1,
stagger: {
each: 0.2,
grid: [cols, rows], // 2 columns, 2 rows
from: 'start' // Start from the first row
},
ease: 'back.out(1.2)',
yoyo: true,
repeat: -1,
repeatDelay: 1
});

gsap.to('h1 span', {
rotationY: 360,
duration: 2,
ease: 'elastic.out(1, 0.3)',
repeat: -1,
repeatDelay: 3
});
}, []);

return (
<div className="bg-orange-50 min-h-screen flex items-center justify-center">
<main className="container mx-auto px-4 text-center pt-12 md:pt-20">
<h1 className="text-6xl lg:text-8xl font-bold text-orange-600 mb-6" aria-label="404 - Page not found">
JITESH-KUMAR05 marked this conversation as resolved.
Show resolved Hide resolved
4<span className="inline-block">0</span>4
</h1>
<p className="text-xl lg:text-2xl text-orange-800 mb-8">Oops! The page you&apos;re looking for has vanished.</p>
JITESH-KUMAR05 marked this conversation as resolved.
Show resolved Hide resolved
<Link href="/" className="inline-block py-3 px-6 bg-orange-500 text-white font-semibold rounded-full hover:bg-orange-600 transition duration-300 mb-12 focus:outline-none focus:ring-2 focus:ring-orange-300" aria-label="Go back to home page">
Take Me Home.
</Link>
<div className="grid grid-cols-2 gap-4 max-w-2xl mx-auto" aria-hidden="true">
{/* Grid of animated squares with images */}
</div>
</main>
</div>
);
}