11import React from "react" ;
22import { ArrowRight , Github } from "lucide-react" ;
33import sort from "../assets/sorting.png"
4+ import { useNavigate } from "react-router-dom" ;
5+
46
57const sections = [
68 {
79 title : "Sorting Algorithms" ,
810 description :
911 "Visualize step-by-step how sorting algorithms organize data efficiently." ,
1012 phase : "Phase 1 (MVP)" ,
11- img : { sort} ,
13+ img : "https://tamimehsan.github.io/AlgorithmVisualizer/images/sort.png?height=200&width=300" ,
14+ link : "/sorting" ,
15+ flag : false
1216 } ,
1317 {
1418 title : "Searching Algorithms" ,
1519 description :
1620 "Understand linear and binary search methods through live visualization." ,
1721 phase : "Phase 1 (MVP)" ,
1822 img : "" ,
23+ link : "/searching" ,
24+ flag : true
1925 } ,
2026 {
2127 title : "Pathfinding Algorithms" ,
2228 description :
2329 "Watch how A*, Dijkstra and BFS explore grids to find the optimal path." ,
2430 phase : "Phase 1 (MVP)" ,
2531 img : "" ,
32+ link : "/pathfinding" ,
33+ flag : true
2634 } ,
2735 {
2836 title : "Graph Algorithms" ,
2937 description :
3038 "Explore BFS, DFS, Kruskal’s, Prim’s, and more — all brought to life interactively." ,
3139 phase : "Phase 2" ,
3240 img : "" ,
41+ link : "/graphs" ,
42+ flag : true
3343 } ,
3444 {
3545 title : "Recursion & Backtracking" ,
3646 description :
3747 "Visualize recursive calls and backtracking patterns like N-Queens or Sudoku." ,
3848 phase : "Phase 2" ,
3949 img : "" ,
50+ link : "/recursion" ,
51+ flag : true
4052 } ,
4153 {
4254 title : "Data Structures Visualization" ,
4355 description :
4456 "Interactively understand stacks, queues, linked lists, trees, and heaps." ,
4557 phase : "Phase 2" ,
4658 img : "" ,
59+ link : "/data-structures" ,
60+ flag : true
4761 } ,
4862 {
4963 title : "Dynamic Programming" ,
5064 description :
5165 "Step through state transitions and table updates to grasp DP intuitively." ,
5266 phase : "Phase 3" ,
5367 img : "" ,
68+ link : "/dynamic-programming" ,
69+ flag : true
5470 } ,
5571] ;
5672
5773
5874const Homepage = ( ) => {
75+ const navigate = useNavigate ( ) ;
76+
5977 return (
6078 < div className = "min-h-screen w-full text-white flex flex-col items-center overflow-x-hidden relative" >
6179 { /* Full-Page Animated Gradient Background */ }
@@ -93,6 +111,7 @@ const Homepage = () => {
93111 { sections . map ( ( section , index ) => (
94112 < div
95113 key = { index }
114+ onClick = { ( ) => section . link && navigate ( section . link ) }
96115 className = "relative group bg-white/10 border border-white/10 rounded-2xl overflow-hidden shadow-2xl hover:shadow-indigo-500/40 transition-all duration-300 backdrop-blur-md hover:-translate-y-2"
97116 >
98117 { /* Image */ }
@@ -119,9 +138,11 @@ const Homepage = () => {
119138 </ div >
120139
121140 { /* SaaS-style “Coming Soon” Overlay */ }
122- < div className = "absolute inset-0 flex items-center justify-center text-white text-lg font-semibold bg-gradient-to-br from-indigo-700/70 to-purple-900/70 backdrop-blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-300" >
123- Coming Soon 🚀
124- </ div >
141+ { section . flag && (
142+ < div className = "absolute inset-0 flex items-center justify-center text-white text-lg font-semibold bg-gradient-to-br from-indigo-700/70 to-purple-900/70 backdrop-blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-300" >
143+ Coming Soon 🚀
144+ </ div >
145+ ) }
125146 </ div >
126147 ) ) }
127148 </ section >
0 commit comments