From a99ff12e210b608f7acf002d6120177071675e63 Mon Sep 17 00:00:00 2001 From: Shayan Date: Fri, 15 May 2026 05:55:45 +0530 Subject: [PATCH] Improved the UI of the targetted section --- src/components/HowItWorks.tsx | 98 ++++++++++++++++++++++++++++------- src/index.css | 71 +++++++++++++++++++++++++ 2 files changed, 151 insertions(+), 18 deletions(-) diff --git a/src/components/HowItWorks.tsx b/src/components/HowItWorks.tsx index 8abf1e1..86224f9 100644 --- a/src/components/HowItWorks.tsx +++ b/src/components/HowItWorks.tsx @@ -1,45 +1,107 @@ +import { useContext } from 'react'; +import { ArrowDown, ArrowRight, BarChart3, Activity, Search } from 'lucide-react'; +import { ThemeContext } from '../context/ThemeContext'; +import type { ThemeContextType } from '../context/ThemeContext'; const HowItWorks = () => { + const themeContext = useContext(ThemeContext) as ThemeContextType | null; + const mode = themeContext?.mode ?? 'light'; + const steps = [ { number: 1, title: 'Search Users', - description: 'Enter GitHub usernames or search for users by name. Add them to your tracking dashboard.' + description: 'Enter GitHub usernames or search for users by name. Add them to your tracking dashboard.', + icon: Search, }, { number: 2, title: 'Monitor Activity', - description: 'Watch insights of commits, pull requests, issues, and other GitHub activities.' + description: 'Watch insights of commits, pull requests, issues, and other GitHub activities.', + icon: Activity, }, { number: 3, title: 'Analyze Insights', - description: 'Review detailed analytics, export reports, and gain valuable insights into development patterns.' + description: 'Review detailed analytics, export reports, and gain valuable insights into development patterns.', + icon: BarChart3, } ]; + const sectionBgClass = mode === 'dark' + ? 'bg-[#1e2130] text-white' + : 'bg-gradient-to-b from-gray-50 via-white to-slate-100 text-gray-900'; + const cardSurfaceClass = mode === 'dark' ? 'bg-white/[0.04]' : 'bg-white'; + const cardBorderClass = mode === 'dark' ? 'border-white/10' : 'border-gray-200'; + const titleTextClass = mode === 'dark' ? 'text-white' : 'text-gray-900'; + const bodyTextClass = mode === 'dark' ? 'text-gray-300' : 'text-gray-600'; + const connectorBubbleClass = mode === 'dark' + ? 'rounded-full border border-blue-400/25 bg-[#1e2130] p-2 text-blue-300 shadow-[0_0_20px_rgba(59,130,246,0.28)]' + : 'rounded-full border border-blue-200 bg-white p-2 text-blue-600 shadow-[0_0_18px_rgba(59,130,246,0.14)]'; + const connectorLineClass = mode === 'dark' + ? 'how-it-works-flow-line' + : 'how-it-works-flow-line light'; + return ( -
-
+
+
-

How It Works

-

+

How It Works

+

Get started in minutes with our simple three-step process

-
- {steps.map((step, index) => ( -
-
- {step.number} -
-

{step.title}

-

- {step.description} -

+
+
+
+ + + + + + +
- ))} +
+ +
+ + + + + + + +
+ +
+ {steps.map((step, index) => { + const IconComponent = step.icon; + + return ( +
+
+
+ {step.number} +
+
+ +
+ +
+ +

{step.title}

+

+ {step.description} +

+
+ ); + })} +
diff --git a/src/index.css b/src/index.css index f4a2957..3f5943c 100644 --- a/src/index.css +++ b/src/index.css @@ -2,6 +2,77 @@ @tailwind components; @tailwind utilities; +@keyframes how-it-works-dash-flow { + from { + background-position: 0 0; + } + + to { + background-position: 72px 0; + } +} + +@keyframes how-it-works-dash-flow-vertical { + from { + background-position: 0 0; + } + + to { + background-position: 0 72px; + } +} + +.how-it-works-flow-line { + display: block; + height: 2px; + border-radius: 9999px; + background-image: repeating-linear-gradient( + 90deg, + rgba(96, 165, 250, 0.78) 0, + rgba(96, 165, 250, 0.78) 14px, + rgba(96, 165, 250, 0.08) 14px, + rgba(96, 165, 250, 0.08) 26px + ); + background-size: 28px 2px; + animation: how-it-works-dash-flow 10s linear infinite; + box-shadow: 0 0 18px rgba(59, 130, 246, 0.24); +} + +.how-it-works-flow-line.light { + background-image: repeating-linear-gradient( + 90deg, + rgba(59, 130, 246, 0.6) 0, + rgba(59, 130, 246, 0.6) 12px, + rgba(59, 130, 246, 0.12) 12px, + rgba(59, 130, 246, 0.12) 24px + ); + box-shadow: 0 0 14px rgba(59, 130, 246, 0.14); +} + +.how-it-works-flow-line.vertical { + width: 2px; + height: 100%; + background-image: repeating-linear-gradient( + 180deg, + rgba(96, 165, 250, 0.78) 0, + rgba(96, 165, 250, 0.78) 14px, + rgba(96, 165, 250, 0.08) 14px, + rgba(96, 165, 250, 0.08) 26px + ); + background-size: 2px 28px; + animation: how-it-works-dash-flow-vertical 10s linear infinite; +} + +.how-it-works-flow-line.vertical.light { + background-image: repeating-linear-gradient( + 180deg, + rgba(59, 130, 246, 0.6) 0, + rgba(59, 130, 246, 0.6) 12px, + rgba(59, 130, 246, 0.12) 12px, + rgba(59, 130, 246, 0.12) 24px + ); +} + .icon-merged { color: #2ea44f; /* Or use your theme color */