From 176033f1e9a4e57e24bfea579cf3e564487ba98b Mon Sep 17 00:00:00 2001 From: Shraddha Bonde Date: Tue, 6 Jan 2026 13:18:59 +0530 Subject: [PATCH] Improve navigation clarity with active routes and page layout --- .../Dashboard/V1/Component/Pages/HomePage.tsx | 107 ++++++++++-------- .../src/shared/component/v1/Navbar.tsx | 4 +- .../src/shared/component/v1/PageLayout.tsx | 24 ++++ 3 files changed, 89 insertions(+), 46 deletions(-) create mode 100644 LocalMind-Frontend/src/shared/component/v1/PageLayout.tsx diff --git a/LocalMind-Frontend/src/features/Dashboard/V1/Component/Pages/HomePage.tsx b/LocalMind-Frontend/src/features/Dashboard/V1/Component/Pages/HomePage.tsx index ed4259d..4c95619 100644 --- a/LocalMind-Frontend/src/features/Dashboard/V1/Component/Pages/HomePage.tsx +++ b/LocalMind-Frontend/src/features/Dashboard/V1/Component/Pages/HomePage.tsx @@ -1,25 +1,30 @@ import { useEffect, useState } from 'react' + import tubeImg from '../../../../../assets/tubeImg.png' import blobImg from '../../../../../assets/blobImg.png' import waveImg from '../../../../../assets/waveImg.png' import dotShadowImg from '../../../../../assets/dotShadowImg.png' import globeImg from '../../../../../assets/globeImg.png' import linesImg from '../../../../../assets/linesImg.png' + import Card from '../../../../../shared/component/v1/Card' import type { CardProps } from '../../../../../types/Interfaces' import InlineLoader from '../Loader/InlineLoader' import EmptyState from '../EmptyState' +import PageLayout from '../../../../../shared/component/v1/PageLayout' + import gsap from 'gsap' import { ScrollTrigger, SplitText } from 'gsap/all' import { useGSAP } from '@gsap/react' + gsap.registerPlugin(ScrollTrigger, SplitText) const HomePage: React.FC = () => { const [features, setFeatures] = useState([]) const [isLoading, setIsLoading] = useState(true) - // Simulate async fetch (realistic frontend pattern) + // Simulate async fetch useEffect(() => { const timer = setTimeout(() => { setFeatures([ @@ -48,6 +53,7 @@ const HomePage: React.FC = () => { useGSAP(() => { const split = new SplitText('.about-para', { type: 'words' }) + gsap.from(split.words, { opacity: 0, y: 20, @@ -64,56 +70,67 @@ const HomePage: React.FC = () => { }, []) return ( -
-
- bgImage -
-

Local Mind

-

- "Build For Speed. Designed For Intelligence." -

+ +
+ {/* Hero Section */} +
+ Background globe + +
+

Local Mind

+

+ "Build For Speed. Designed For Intelligence." +

+
+ +
- -
- {/* Features Section (Loading / Empty / Data) */} -
- {isLoading && } + {/* Features Section */} +
+ {isLoading && } - {!isLoading && features.length === 0 && ( - - )} + {!isLoading && features.length === 0 && ( + + )} - {!isLoading && features.length > 0 && ( -
- {features.map((feature, index) => ( - - ))} -
- )} -
+ {!isLoading && features.length > 0 && ( +
+ {features.map((feature) => ( + + ))} +
+ )} +
-
-

- About -

-

- LocalMind is a free, open-source platform made for students, developers, and anyone who - wants to use AI without paying expensive fees or worrying about usage limits. -

-

- With LocalMind, you can run powerful AI models directly on your computer or connect to - cloud models using your own API key. -

+ {/* About Section */} +
+

+ About +

+ +

+ LocalMind is a free, open-source platform made for students, developers, and anyone who + wants to use AI without paying expensive fees or worrying about usage limits. +

+ +

+ With LocalMind, you can run powerful AI models directly on your computer or connect to + cloud models using your own API key. +

+
-
+ ) } diff --git a/LocalMind-Frontend/src/shared/component/v1/Navbar.tsx b/LocalMind-Frontend/src/shared/component/v1/Navbar.tsx index bfe080a..1637a1b 100644 --- a/LocalMind-Frontend/src/shared/component/v1/Navbar.tsx +++ b/LocalMind-Frontend/src/shared/component/v1/Navbar.tsx @@ -4,7 +4,9 @@ import { NavLink } from 'react-router-dom' const Navbar: React.FC = () => { const navLinkClass = ({ isActive }: { isActive: boolean }) => - isActive ? 'text-white line-through opacity-80' : 'text-white' + isActive + ? 'text-blue-400 font-semibold underline underline-offset-8' + : 'text-white hover:text-blue-300 transition-colors' return (
diff --git a/LocalMind-Frontend/src/shared/component/v1/PageLayout.tsx b/LocalMind-Frontend/src/shared/component/v1/PageLayout.tsx new file mode 100644 index 0000000..0d49340 --- /dev/null +++ b/LocalMind-Frontend/src/shared/component/v1/PageLayout.tsx @@ -0,0 +1,24 @@ +import React from "react"; + +type Props = { + title: string; + subtitle?: string; + children: React.ReactNode; +}; + +const PageLayout: React.FC = ({ title, subtitle, children }) => { + return ( +
+
+

{title}

+ {subtitle && ( +

{subtitle}

+ )} +
+ + {children} +
+ ); +}; + +export default PageLayout;