Skip to content

Commit

Permalink
Merge pull request #46 from myselfshivams/main
Browse files Browse the repository at this point in the history
added:: Custom 404 page and meta tags for SEO
  • Loading branch information
ajaynegi45 authored Oct 2, 2024
2 parents fb38bef + d092e7e commit 8454689
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 23 deletions.
63 changes: 41 additions & 22 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,52 @@ import Navbar from "@/components/ui/Navbar";
import Footer from "@/components/ui/Footer";
// import { SpeedInsights } from '@vercel/speed-insights/next';

const customFont = localFont(
{
src: "../font/customFont.otf",
variable: "--myCustomFont",
}
)
const customFont = localFont({
src: "../font/customFont.otf",
variable: "--myCustomFont",
});

export const metadata: Metadata = {
title: "Uttarakhand Culture",
description: "Our aim is to ensure that this invaluable heritage is passed down to future generations.",
title: "Uttarakhand Culture",
description: "Our aim is to ensure that this invaluable heritage is passed down to future generations.",
keywords: "Uttarakhand, culture, heritage, festivals, traditions, digital preservation",
openGraph: {
title: "Uttarakhand Culture",
description: "Explore the rich cultural heritage of Uttarakhand.",
url: "https://uttarakhand-culture.vercel.app",
siteName: "Uttarakhand Culture",
images: [
{
url: "https://uttarakhand-culture.vercel.app/_next/image?url=%2F_next%2Fstatic%2Fmedia%2FheroMapImage.fc8fad10.webp&w=828&q=75",
width: 800,
height: 600,
alt: "Cultural Heritage of Uttarakhand",
},
],
locale: "en_US",
type: "website",
},
robots: {
index: true,
follow: true,
},
};

export default function RootLayout({
children,
children,
}: Readonly<{
children: React.ReactNode;
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={customFont.className} >
<main>
<Navbar/>
{children}
{/*<SpeedInsights />*/}
<Footer/>
</main>
</body>
</html>
);
return (
<html lang="en">
<body className={customFont.className}>
<main>
<Navbar/>
{children}
{/*<SpeedInsights />*/}
<Footer/>
</main>
</body>
</html>
);
}
69 changes: 69 additions & 0 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import Link from 'next/link';

const Custom404 = () => {
return (
<div style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
height: '70vh',
backgroundColor: 'rgba(255, 255, 255, 0.8)',
color: '#000000',
fontFamily: 'Arial, sans-serif',
textAlign: 'center',
padding: '40px',
boxSizing: 'border-box',
borderRadius: '10px',
backdropFilter: 'blur(10px)',
width: '90%',
maxWidth: '900px',
margin: '0 auto',
}}>
<h1 style={{
fontSize: '72px',
fontWeight: 'bold',
marginBottom: '20px',
textShadow: '1px 1px 2px rgba(0, 0, 0, 0.1)',
}}>
404
</h1>
<h2 style={{
fontSize: '36px',
marginBottom: '10px',
color: '#333333',
}}>
Page Not Found
</h2>
<p style={{
fontSize: '18px',
marginBottom: '30px',
maxWidth: '600px',
lineHeight: '1.5',
color: '#555555',
}}>
Sorry, the page you are looking for does not exist. Please check the URL or return to the home page.
</p>
<Link href="/" style={{
padding: '10px 20px',
backgroundColor: '#000000',
color: '#ffffff',
borderRadius: '5px',
textDecoration: 'none',
fontWeight: 'bold',
transition: 'background-color 0.3s',
}}>
Go back to Home
</Link>
<p style={{
marginTop: '20px',
color: '#777777',
fontSize: '14px',
}}>
Or you can try searching for what you need.
</p>
</div>
);
};

export default Custom404;
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ export default function Home() {

</>
);
}
}
69 changes: 69 additions & 0 deletions src/app/working-error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import Link from 'next/link';

const Custom404 = () => {
return (
<div style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
height: '70vh',
backgroundColor: 'rgba(255, 255, 255, 0.8)',
color: '#000000',
fontFamily: 'Arial, sans-serif',
textAlign: 'center',
padding: '40px',
boxSizing: 'border-box',
borderRadius: '10px',
backdropFilter: 'blur(10px)',
width: '90%',
maxWidth: '900px',
margin: '0 auto',
}}>
<h1 style={{
fontSize: '72px',
fontWeight: 'bold',
marginBottom: '20px',
textShadow: '1px 1px 2px rgba(0, 0, 0, 0.1)',
}}>
Sorry!
</h1>
<h2 style={{
fontSize: '36px',
marginBottom: '10px',
color: '#333333',
}}>
Page Under Construction
</h2>
<p style={{
fontSize: '18px',
marginBottom: '30px',
maxWidth: '600px',
lineHeight: '1.5',
color: '#555555',
}}>
Sorry, this page is currently under construction. We’re working hard to get it ready for you.
</p>
<Link href="/" style={{
padding: '10px 20px',
backgroundColor: '#000000',
color: '#ffffff',
borderRadius: '5px',
textDecoration: 'none',
fontWeight: 'bold',
transition: 'background-color 0.3s',
}}>
Go back to Home
</Link>
<p style={{
marginTop: '20px',
color: '#777777',
fontSize: '14px',
}}>
Or you can try searching for what you need.
</p>
</div>
);
};

export default Custom404;

0 comments on commit 8454689

Please sign in to comment.