From 5b2cd940da57ece553beb03a03efd29a1618c031 Mon Sep 17 00:00:00 2001 From: Harika2011 <103110286+Harika2011@users.noreply.github.com> Date: Sun, 26 Apr 2026 13:58:27 +0530 Subject: [PATCH] add theme provider and navbar toggle for dark/light mode --- app/about/page.tsx | 82 ++++++++++++++++++++--------------- app/globals.css | 29 ++++++++++++- app/instructor/[id]/page.tsx | 72 +++++++++++++++++++++--------- app/layout.tsx | 31 +++++-------- app/page.tsx | 73 ++++++++++++++++++------------- components/InstructorCard.tsx | 34 +++++++++++---- components/Navbar.tsx | 53 +++++++++++++++++----- lib/Core/theme_provider.tsx | 37 ++++++++++++++++ tailwind.config.ts | 5 ++- 9 files changed, 290 insertions(+), 126 deletions(-) create mode 100644 lib/Core/theme_provider.tsx diff --git a/app/about/page.tsx b/app/about/page.tsx index 0c9935c..7c4e6fa 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -1,15 +1,20 @@ +"use client"; + import Link from "next/link"; export default function AboutPage() { return ( -
+
{/* Hero Section */} -
+ {/* Added dark:from-violet-900/20 dark:via-slate-900 dark:to-slate-900 dark:border dark:border-slate-800 */} +
-

- About Parampara + {/* Added dark:text-white */} +

+ About Parampara

-

+ {/* Added dark:text-slate-400 */} +

A living bridge between tradition and technology — enabling culture to thrive across borders, while creating real economic opportunity for Indian women. @@ -20,10 +25,12 @@ export default function AboutPage() { {/* Problem Section */}

-

+ {/* Added dark:text-white */} +

The Problem We're Solving

-

+ {/* Added dark:text-slate-500 */} +

Millions of Indians abroad are losing touch with their roots. At the same time, skilled women in India lack platforms to reach a global audience. @@ -50,13 +57,14 @@ export default function AboutPage() { ].map((item) => (

{item.icon}
-

+

{item.title}

-

+

{item.desc}

@@ -65,12 +73,13 @@ export default function AboutPage() {
{/* Solution Section */} -
+ {/* Added dark:bg-slate-900/50 dark:border-slate-800 */} +
-

+

Our Solution

-

+

Parampara is a digital marketplace that connects verified women instructors from India with global learners seeking real cultural experiences. @@ -102,14 +111,15 @@ export default function AboutPage() { ].map((item) => (

{item.icon}
-

+

{item.title}

-

+

{item.desc}

@@ -121,10 +131,10 @@ export default function AboutPage() { {/* Impact Vision Section */}
-

+

🌱 Our Impact Vision

-

+

We measure success not just in users, but in lives changed and cultures preserved.

@@ -150,19 +160,20 @@ export default function AboutPage() { ].map((item) => (
{item.stat}
-

{item.label}

-

+

{item.label}

+

{item.desc}

))}
- {/* Vision Quote */} -
+ {/* Vision Quote - Violet background usually looks good in both, but we can darken slightly */} +

"Parampara is not just a platform — it's a living bridge between tradition and technology, enabling culture to thrive across @@ -175,12 +186,13 @@ export default function AboutPage() {

{/* Join Our Community Section */} -
+ {/* Added dark:bg-slate-900/50 dark:border-slate-800 */} +
-

+

🌟 Join the Parampara Community

-

+

Whether you're looking to reconnect with your roots or share your cultural expertise, Parampara welcomes you to our growing community of learners and instructors. @@ -188,12 +200,13 @@ export default function AboutPage() {

-
+ {/* Card 1 */} +
🎓
-

+

For Learners

-

+

Discover authentic Indian culture through live sessions with verified women instructors. Learn language, cooking, dance, and traditions from the comfort of your home. @@ -206,12 +219,13 @@ export default function AboutPage() {

-
+ {/* Card 2 */} +
👩‍🏫
-

+

For Instructors

-

+

Share your cultural knowledge and skills with a global audience. Earn flexible income while preserving and teaching traditional Indian arts and wisdom. @@ -226,7 +240,7 @@ export default function AboutPage() {

-

+

Ready to start your cultural journey?

); -} +} \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 98bec1e..930d913 100644 --- a/app/globals.css +++ b/app/globals.css @@ -3,10 +3,24 @@ @tailwind utilities; :root { + --bg-start: #ffffff; + --bg-end: #f8f5ff; + --text-primary: #111827; + --border-color: #e5e7eb; + color-scheme: light; font-family: 'Inter', sans-serif; } +.dark { + --bg-start: #0f172a; + --bg-end: #020617; + --text-primary: #f1f5f9; + --border-color: #1e293b; + + color-scheme: dark; +} + html { scroll-behavior: smooth; } @@ -14,8 +28,10 @@ html { body { margin: 0; min-height: 100vh; - background: linear-gradient(180deg, #ffffff 0%, #f8f5ff 100%); - color: #111827; + background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%); + color: var(--text-primary); + + transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease; } * { @@ -33,3 +49,12 @@ select, textarea { font: inherit; } + +.glass-card { + background: rgba(255, 255, 255, 0.8); + border: 1px solid var(--border-color); +} + +.dark .glass-card { + background: rgba(30, 41, 59, 0.5); +} \ No newline at end of file diff --git a/app/instructor/[id]/page.tsx b/app/instructor/[id]/page.tsx index 059bc74..b839268 100644 --- a/app/instructor/[id]/page.tsx +++ b/app/instructor/[id]/page.tsx @@ -5,27 +5,42 @@ type PageProps = { params: { id: string }; }; -export default function InstructorProfilePage({ params }: PageProps) { +export default function InstructorProfilePage({ params }: { params: { id: string } }) { const instructor = instructors.find((item) => item.id === params.id); if (!instructor) { return ( -
-

Instructor not found.

+
+ {/* Added dark:text-slate-300 */} +

+ Instructor not found. +

); } return ( -
-
+
+ {/* Main Card: Added dark:border-slate-800 dark:bg-slate-900 */} +
+
-

{instructor.location}

-

{instructor.name}

-

{instructor.expertise}

+ {/* Added dark:text-violet-400 */} +

+ {instructor.location} +

+ {/* Added dark:text-white */} +

+ {instructor.name} +

+ {/* Added dark:text-slate-400 */} +

+ {instructor.expertise} +

-
+ {/* Rate Badge: Added dark:bg-violet-900/30 dark:text-violet-300 */} +
${instructor.ratePerHour} / hour
@@ -33,15 +48,21 @@ export default function InstructorProfilePage({ params }: PageProps) {
-

About this mentor

-

{instructor.description}

+ {/* Added dark:text-white */} +

About this mentor

+ {/* Added dark:text-slate-400 */} +

+ {instructor.description} +

-

What you will learn

-
    + {/* Added dark:text-white */} +

    What you will learn

    +
      {instructor.specialties.map((specialty) => ( -
    • + /* List Item: Added dark:border-slate-700 dark:bg-slate-800 dark:text-slate-300 */ +
    • {specialty}
    • ))} @@ -49,16 +70,25 @@ export default function InstructorProfilePage({ params }: PageProps) {
-
); -} +} \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index fb04a48..d89261d 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,26 +1,19 @@ +import { ThemeProvider } from "../lib/core/theme_provider"; +import Navbar from "../components/Navbar"; import "./globals.css"; -import type { Metadata } from "next"; -import Navbar from "@/components/Navbar"; -import Footer from "@/components/Footer"; -export const metadata: Metadata = { - title: "Parampara", - description: - "Connect diaspora learners with Indian women instructors for language and culture sessions.", -}; - -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { +export default function RootLayout({ children }: { children: React.ReactNode }) { return ( - - -
{children}
-