From 47da64f802f9f53ccb68e7630ceba05b8743780a Mon Sep 17 00:00:00 2001 From: nitin mohan Date: Mon, 6 Jul 2026 23:42:42 +0530 Subject: [PATCH 1/5] added dashboard section --- app/(public)/page.tsx | 4 ++++ app/dashboard/page.tsx | 14 +++++++------- components/navbar.tsx | 14 ++++++++++---- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/(public)/page.tsx b/app/(public)/page.tsx index d23b10d..0b1494e 100644 --- a/app/(public)/page.tsx +++ b/app/(public)/page.tsx @@ -1,6 +1,7 @@ import Hero from "@/features/landing/hero"; import Universities from "@/features/landing/universities"; import ContactSection from "@/components/contact/ContactSection"; +import DashboardPage from "@/app/dashboard/page"; import { Suspense } from "react"; export default function HomePage() { @@ -10,6 +11,9 @@ export default function HomePage() { }> +
+ +
); diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 19eb110..8794266 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -6,7 +6,7 @@ import { RecentActivityCard } from "@/components/dashboard/recent-activity-card" export default function DashboardPage() { return ( -
+
{/* 1. Premium Welcome Hero */}
@@ -14,15 +14,15 @@ export default function DashboardPage() {
-
+
Student Dashboard
-

+

Welcome Back 👋

-

+

Continue your learning journey with Hyper Learning. Access your subjects, AI notes, and PYQs.

@@ -30,10 +30,10 @@ export default function DashboardPage() {
-
+
{/* 2. Quick Action Cards */}
-
+

Quick Actions

@@ -72,7 +72,7 @@ export default function DashboardPage() { {/* 3. Continue Learning / Recent Activity */}
-
+

Continue Learning

diff --git a/components/navbar.tsx b/components/navbar.tsx index 3b029d7..f5e36c9 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -33,7 +33,7 @@ const navLinks = [ }, { label: "Dashboard", - href: "/dashboard", + href: "/#Dashboard", icon: LayoutDashboard, }, { @@ -101,11 +101,15 @@ export default function Navbar() { .map((link) => link.href.substring(2)); let current = ""; + // Use a viewing offset at 40% of the screen height (where the user's eyes naturally focus) + const viewingOffset = window.innerHeight * 0.4; + for (const section of sections) { const element = document.getElementById(section); if (element) { const rect = element.getBoundingClientRect(); - if (rect.top <= 120 && rect.bottom >= 120) { + // A section is active if this viewing offset falls within its top and bottom bounds + if (rect.top <= viewingOffset && rect.bottom >= viewingOffset) { current = section; break; } @@ -287,7 +291,8 @@ export default function Navbar() { (pathname === "/" && link.href.startsWith("/#") && activeSection === link.href) || - (pathname === link.href && !link.href.startsWith("/#")); + (pathname === link.href && !link.href.startsWith("/#")) || + (pathname === "/dashboard" && link.label === "Dashboard"); const Icon = link.icon; @@ -513,7 +518,8 @@ export default function Navbar() { (pathname === "/" && link.href.startsWith("/#") && activeSection === link.href) || - (pathname === link.href && !link.href.startsWith("/#")); + (pathname === link.href && !link.href.startsWith("/#")) || + (pathname === "/dashboard" && link.label === "Dashboard"); return ( Date: Mon, 6 Jul 2026 23:45:47 +0530 Subject: [PATCH 2/5] added seperation line between university sectionn and dashboard --- app/dashboard/page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 8794266..c113032 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -7,6 +7,9 @@ import { RecentActivityCard } from "@/components/dashboard/recent-activity-card" export default function DashboardPage() { return (
+ {/* Top Section Divider for visual separation from Universities */} +
+ {/* 1. Premium Welcome Hero */}
From 59f39eece660060ed556542080255c15789d3ba9 Mon Sep 17 00:00:00 2001 From: nitin mohan Date: Tue, 7 Jul 2026 15:34:37 +0530 Subject: [PATCH 3/5] restructure dashboard page --- app/dashboard/page.tsx | 191 +++++++++--------- components/dashboard/quick-action-card.tsx | 27 ++- components/dashboard/recent-activity-card.tsx | 25 ++- 3 files changed, 128 insertions(+), 115 deletions(-) diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index c113032..9e11a35 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -6,108 +6,113 @@ import { RecentActivityCard } from "@/components/dashboard/recent-activity-card" export default function DashboardPage() { return ( -
+
{/* Top Section Divider for visual separation from Universities */} -
+
- {/* 1. Premium Welcome Hero */} -
-
-
-
-
+
+ +
+ + {/* 1. Premium Welcome Banner (Full Width) */} +
+
+
+
+
-
-
-
- Student Dashboard +
+
+
+ Student Dashboard +
+

+ Welcome Back 👋 +

+

+ Pick up where you left off. Access your syllabus, study your AI-generated notes, and practice with past year questions. +

+
-

- Welcome Back 👋 -

-

- Continue your learning journey with Hyper Learning. Access your - subjects, AI notes, and PYQs. -

-
-
-
- {/* 2. Quick Action Cards */} -
-
-

- Quick Actions -

-
-
- - - - -
-
+
+ {/* 2. Continue Learning Section (Left side) */} +
+
+

+ Continue Learning +

+ + View all history → + +
+
+ + +
+
- {/* 3. Continue Learning / Recent Activity */} -
-
-

- Continue Learning -

- - View all history - + {/* 3. Quick Actions (Right side grid) */} +
+
+

+ Quick Actions +

+
+
+ + + + +
+
-
- - -
-
+
); diff --git a/components/dashboard/quick-action-card.tsx b/components/dashboard/quick-action-card.tsx index 787dcd5..cb102ec 100644 --- a/components/dashboard/quick-action-card.tsx +++ b/components/dashboard/quick-action-card.tsx @@ -58,26 +58,31 @@ export function QuickActionCard({ return ( -
- +
+ +
+
+ +
+
+ +
-
+ +

{title}

-

+

{description}

- ); } diff --git a/components/dashboard/recent-activity-card.tsx b/components/dashboard/recent-activity-card.tsx index 05d035a..d82e511 100644 --- a/components/dashboard/recent-activity-card.tsx +++ b/components/dashboard/recent-activity-card.tsx @@ -25,33 +25,36 @@ export function RecentActivityCard({ return ( -
-
-
+
+ +
+
+
-

+

{title}

-

{subtitle}

+

{subtitle}

-
+
{timeAgo}
-
-
+ +
+
{progressText}
-
+
Resume{" "} - +
From d720ed7e2b8da35d0d722f9fa443f27ce7079414 Mon Sep 17 00:00:00 2001 From: nitin mohan Date: Tue, 7 Jul 2026 15:41:34 +0530 Subject: [PATCH 4/5] fixes colar of dashboard section and improving light mode visibility --- components/dashboard/quick-action-card.tsx | 6 +++--- components/dashboard/recent-activity-card.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/dashboard/quick-action-card.tsx b/components/dashboard/quick-action-card.tsx index cb102ec..20c36a3 100644 --- a/components/dashboard/quick-action-card.tsx +++ b/components/dashboard/quick-action-card.tsx @@ -58,9 +58,9 @@ export function QuickActionCard({ return ( -
+

{title}

diff --git a/components/dashboard/recent-activity-card.tsx b/components/dashboard/recent-activity-card.tsx index d82e511..666d860 100644 --- a/components/dashboard/recent-activity-card.tsx +++ b/components/dashboard/recent-activity-card.tsx @@ -25,17 +25,17 @@ export function RecentActivityCard({ return ( -
+
-
+
-

+

{title}

{subtitle}

From 4ebcb4b2cea3cf93931c7018df20337aba5231bf Mon Sep 17 00:00:00 2001 From: nitin mohan Date: Tue, 7 Jul 2026 15:52:20 +0530 Subject: [PATCH 5/5] fixed format --- app/dashboard/page.tsx | 8 +++----- components/dashboard/quick-action-card.tsx | 8 +++++--- components/dashboard/recent-activity-card.tsx | 6 ++++-- components/navbar.tsx | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 9e11a35..5594e22 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -9,11 +9,9 @@ export default function DashboardPage() {
{/* Top Section Divider for visual separation from Universities */}
- +
-
- {/* 1. Premium Welcome Banner (Full Width) */}
@@ -30,7 +28,8 @@ export default function DashboardPage() { Welcome Back 👋

- Pick up where you left off. Access your syllabus, study your AI-generated notes, and practice with past year questions. + Pick up where you left off. Access your syllabus, study your + AI-generated notes, and practice with past year questions.

@@ -111,7 +110,6 @@ export default function DashboardPage() {
-
diff --git a/components/dashboard/quick-action-card.tsx b/components/dashboard/quick-action-card.tsx index 20c36a3..b59c14a 100644 --- a/components/dashboard/quick-action-card.tsx +++ b/components/dashboard/quick-action-card.tsx @@ -61,18 +61,20 @@ export function QuickActionCard({ className={`group relative flex flex-col gap-3 overflow-hidden rounded-[20px] border border-black/10 dark:border-white/[0.08] bg-black/[0.02] dark:bg-white/[0.03] p-5 shadow-[inset_0_1px_0_rgba(255,255,255,0.05)] transition-transform hover:-translate-y-1 hover:shadow-xl hover:bg-black/[0.04] dark:hover:bg-white/[0.05] hover:border-blue-500/30 ${style.wrapper}`} >
- +
-
+
- +

{title}

-

{subtitle}

+

+ {subtitle} +

@@ -46,7 +48,7 @@ export function RecentActivityCard({ {timeAgo}
- +
diff --git a/components/navbar.tsx b/components/navbar.tsx index f5e36c9..1f2faaf 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -103,7 +103,7 @@ export default function Navbar() { let current = ""; // Use a viewing offset at 40% of the screen height (where the user's eyes naturally focus) const viewingOffset = window.innerHeight * 0.4; - + for (const section of sections) { const element = document.getElementById(section); if (element) {