From a96e014ea7c13054d63c6432b621c8a86754404d Mon Sep 17 00:00:00 2001 From: Rutunj Date: Mon, 10 Mar 2025 14:41:12 +0530 Subject: [PATCH 1/2] feat: implement custom middleware and layout for AI Demystified page --- app/ai-demystified/layout.tsx | 38 +++++ app/ai-demystified/page.tsx | 272 +++++++++++++++------------------- app/layout.tsx | 6 +- middleware.ts | 24 +++ 4 files changed, 190 insertions(+), 150 deletions(-) create mode 100644 app/ai-demystified/layout.tsx create mode 100644 middleware.ts diff --git a/app/ai-demystified/layout.tsx b/app/ai-demystified/layout.tsx new file mode 100644 index 0000000..3868176 --- /dev/null +++ b/app/ai-demystified/layout.tsx @@ -0,0 +1,38 @@ +import Link from "next/link"; +import Image from "next/image"; +import { ReactNode } from "react"; + +interface LayoutProps { + children: ReactNode; +} + +export default function AIDemystifiedLayout({ children }: LayoutProps) { + return ( + <> + {/* Minimal Transparent Navbar */} +
+ +
+ {children} + + ); +} diff --git a/app/ai-demystified/page.tsx b/app/ai-demystified/page.tsx index f984d56..2eea237 100644 --- a/app/ai-demystified/page.tsx +++ b/app/ai-demystified/page.tsx @@ -6,7 +6,7 @@ import { Button } from "@/components/ui/button"; export default function AIDemystified() { return ( -
+
{/* Wavy Lines Background */}
- {/* Content */} -
- - AI Demystified | Rotaract Club - - - -
-
-
- {/* Left Column - Content */} -
-
- THE MAIN TREND OF THE YEAR -
+ {/* Content Container */} +
+
+
+ {/* Left Column - Content */} +
+
+ THE MAIN TREND OF THE YEAR +
-

- AI Demystified -

+

+ AI Demystified +

-

- Practical AI for Everyone -

+

+ Practical AI for Everyone +

-

- Unlock the power of AI in your daily life! Learn how tools - like ChatGPT, Gemini, and Grok can boost productivity, - simplify tasks, and give you an edge in the digital world.🚀 -

+

+ Unlock the power of AI in your daily life! Learn how tools like + ChatGPT, Gemini, and Grok can boost productivity, simplify + tasks, and give you an edge in the digital world.🚀 +

-
- - - -
+
+ + + +
- {/* Event Details */} -
-
-
- 📅 -
-

Date

-

12 March 2025

-
-
-
- -
-

Time

-

8:30 PM

-
+ {/* Event Details Grid */} +
+
+
+ 📅 +
+

Date

+

12 March 2025

-
-
- 📍 -
-

Venue

-

Online

-
-
-
- 💰 -
-

Registration

-

Free

-
+
+ +
+

Time

+

8:30 PM

- - {/* Speakers */} -
-

Speakers

-
-
- Shubham Gupta -

Shubham Gupta

-

- GenAI Expert @ Skitre.ai -

+
+
+ 📍 +
+

Venue

+

Online

-
- Kartik Patel -

Kartik Patel

-

- Product Engineer @ Skitre.ai -

+
+
+ 💰 +
+

Registration

+

Free

- {/* Right Column - Decorative Elements */} -
-
- AI Assistant + {/* Speakers */} +
+

Speakers

+
+
+ Shubham Gupta +

Shubham Gupta

+

+ GenAI Expert @ Skitre.ai +

+
+
+ Kartik Patel +

Kartik Patel

+

+ Product Engineer @ Skitre.ai +

+
+
- {/* Partners */} -
-
- Skitre.ai - Rotaract District 3060 - Rotaract Vadodara -
+ {/* Right Column - AI Robot */} +
+ AI Assistant
-
-
- {/* Update the AI Robot section */} -
-
- AI Assistant + {/* Partners */} +
+
+ Skitre.ai + Rotaract District 3060 + Rotaract Vadodara +
+
+
); diff --git a/app/layout.tsx b/app/layout.tsx index 8282021..5529abc 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import "./globals.css"; import Navbar from "@/components/navbar"; // import Footer from "@/components/footer"; +import { headers } from 'next/headers'; export const metadata: Metadata = { title: "Create Next App", @@ -13,10 +14,13 @@ export default function RootLayout({ }: { children: React.ReactNode; }) { + const headersList = headers(); + const hideNavbar = headersList.get('x-hide-navbar') === 'true'; + return ( - + {!hideNavbar && }
{children}
{/*