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..5594e22 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -6,105 +6,111 @@ import { RecentActivityCard } from "@/components/dashboard/recent-activity-card" export default function DashboardPage() { return ( -
- {/* 1. Premium Welcome Hero */} -
-
-
-
-
+
+ {/* Top Section Divider for visual separation from Universities */} +
-
-
-
- Student Dashboard +
+
+ {/* 1. Premium Welcome Banner (Full Width) */} +
+
+
+
-

- Welcome Back 👋 -

-

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

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

- Quick Actions -

-
-
- - - - +
+
+
+ Student Dashboard +
+

+ Welcome Back 👋 +

+

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

+
+
-
- {/* 3. Continue Learning / Recent Activity */} -
-
-

- Continue Learning -

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

+ 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..b59c14a 100644 --- a/components/dashboard/quick-action-card.tsx +++ b/components/dashboard/quick-action-card.tsx @@ -58,26 +58,33 @@ export function QuickActionCard({ return ( -
- +
+ +
+
+ +
+
+ +
-
+ +

{title}

-

+

{description}

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

+

{title}

-

{subtitle}

+

+ {subtitle} +

-
+
{timeAgo}
-
-
+ +
+
{progressText}
-
+
Resume{" "} - +
diff --git a/components/navbar.tsx b/components/navbar.tsx index 3b029d7..1f2faaf 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 (