Improve video grid layout and navigation with track-style arrows
Adjusted netflix-grid.tsx: Modified container classes for `CategoryRow` to ensure videos do not overflow horizontally (`max-w-6xl mx-auto` and `px-4`). Changed navigation arrows to a gradient track style positioned at the edges of the container, replacing circular buttons. Updated video card widths for various screen sizes to `w-280px` to `w-340px`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 8e9f2b36-ec9c-4acc-b19b-5304fa9790c5 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/8e9f2b36-ec9c-4acc-b19b-5304fa9790c5/srjpoes
This commit is contained in:
parent
fb6c395d85
commit
6c96096968
@ -242,18 +242,18 @@ function CategoryRow({ category, onVideoClick, hideScrollButtons = false }: Cate
|
|||||||
<h2 className="text-lg font-medium text-bunny-light mb-1 mx-2 leading-tight uppercase">
|
<h2 className="text-lg font-medium text-bunny-light mb-1 mx-2 leading-tight uppercase">
|
||||||
{category.title}
|
{category.title}
|
||||||
</h2>
|
</h2>
|
||||||
<div className="relative overflow-hidden">
|
<div className="relative overflow-hidden max-w-6xl mx-auto">
|
||||||
|
|
||||||
{/* Scrollable video row - true edge to edge */}
|
{/* Scrollable video row - true edge to edge */}
|
||||||
<div
|
<div
|
||||||
ref={scrollRef}
|
ref={scrollRef}
|
||||||
className="flex gap-3 overflow-x-auto scrollbar-hide pb-0 pl-4 pr-16"
|
className="flex gap-3 overflow-x-auto scrollbar-hide pb-0 px-4"
|
||||||
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
|
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
|
||||||
>
|
>
|
||||||
{category.videos.map((video, index) => (
|
{category.videos.map((video, index) => (
|
||||||
<div
|
<div
|
||||||
key={video.id}
|
key={video.id}
|
||||||
className="flex-shrink-0 w-[200px] sm:w-[240px] md:w-[280px] lg:w-[300px] xl:w-[320px] relative group hover:z-30"
|
className="flex-shrink-0 w-[280px] md:w-[300px] lg:w-[320px] xl:w-[340px] relative group hover:z-30"
|
||||||
onMouseEnter={() => setClickedVideoId(video.id)}
|
onMouseEnter={() => setClickedVideoId(video.id)}
|
||||||
>
|
>
|
||||||
{/* Top 10 Number overlay for first category */}
|
{/* Top 10 Number overlay for first category */}
|
||||||
@ -278,26 +278,16 @@ function CategoryRow({ category, onVideoClick, hideScrollButtons = false }: Cate
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Navigation arrows - left and right */}
|
{/* Navigation arrows - track style */}
|
||||||
<div className="absolute left-2 top-1/2 -translate-y-1/2 z-[40] hidden md:block">
|
<div className="absolute left-0 top-0 bottom-0 w-12 bg-gradient-to-r from-black/60 to-transparent z-[40] hidden md:flex items-center justify-center hover:from-black/80 transition-all duration-300 cursor-pointer"
|
||||||
<Button
|
onMouseEnter={() => startAutoScroll('left')}
|
||||||
onMouseEnter={() => startAutoScroll('left')}
|
onMouseLeave={stopAutoScroll}>
|
||||||
onMouseLeave={stopAutoScroll}
|
<ChevronLeft className="w-6 h-6 text-white" />
|
||||||
className="bg-black/60 hover:bg-black/80 text-white border-none w-10 h-16 rounded transition-all duration-300 flex items-center justify-center shadow-lg backdrop-blur-sm"
|
|
||||||
size="sm"
|
|
||||||
>
|
|
||||||
<ChevronLeft className="w-4 h-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="absolute right-2 top-1/2 -translate-y-1/2 z-[40] hidden md:block">
|
<div className="absolute right-0 top-0 bottom-0 w-12 bg-gradient-to-l from-black/60 to-transparent z-[40] hidden md:flex items-center justify-center hover:from-black/80 transition-all duration-300 cursor-pointer"
|
||||||
<Button
|
onMouseEnter={() => startAutoScroll('right')}
|
||||||
onMouseEnter={() => startAutoScroll('right')}
|
onMouseLeave={stopAutoScroll}>
|
||||||
onMouseLeave={stopAutoScroll}
|
<ChevronRight className="w-6 h-6 text-white" />
|
||||||
className="bg-black/60 hover:bg-black/80 text-white border-none w-10 h-16 rounded transition-all duration-300 flex items-center justify-center shadow-lg backdrop-blur-sm"
|
|
||||||
size="sm"
|
|
||||||
>
|
|
||||||
<ChevronRight className="w-4 h-4" />
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user