From 5564863b27a3198ff76974259708e7cb9399fd26 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Fri, 29 Aug 2025 20:21:41 +0000 Subject: [PATCH] Add interactive scrolling and navigation to video carousels Update `SimpleCarousel` component to include left/right scroll buttons, implement infinite scrolling effect by duplicating video list, and refine visual styling for video cards. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/kdQ95gE --- client/src/components/simple-carousel.tsx | 77 ++++++++++++++++------- 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/client/src/components/simple-carousel.tsx b/client/src/components/simple-carousel.tsx index 4cee23e..8c1a567 100644 --- a/client/src/components/simple-carousel.tsx +++ b/client/src/components/simple-carousel.tsx @@ -96,33 +96,66 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse }, [category.videos.length]); return ( -
+

{category.title}

-
- {/* Simple grid layout - videos next to each other */} -
- {category.videos.map((video, videoIndex) => ( -
- {/* Top 10 Number overlay for first category */} - {category.title.includes("Top 10") && ( -
- {videoIndex + 1} +
+ {/* Left scroll button */} + + + {/* Right scroll button */} + + + {/* Scroll container */} +
+
+ {/* Create many copies for infinite feel */} + {Array.from({ length: 20 }).map((_, copyIndex) => + category.videos.map((video, videoIndex) => ( +
+ {/* Top 10 Number overlay for first category */} + {category.title.includes("Top 10") && ( +
+ {videoIndex + 1} +
+ )} +
- )} - -
- ))} + )) + ).flat()} +