Limit displayed video cards and adjust layout for desktop view

Update client/src/components/netflix-grid.tsx and client/src/pages/home.tsx to adjust the display of video cards and container widths for a better desktop experience.

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/0CzYEcy
This commit is contained in:
sebastjanartic 2025-09-01 14:41:47 +00:00
parent 52b2846821
commit 6e8e6d7167
2 changed files with 4 additions and 4 deletions

View File

@ -247,13 +247,13 @@ function CategoryRow({ category, onVideoClick, hideScrollButtons = false }: Cate
{/* Scrollable video row - true edge to edge */}
<div
ref={scrollRef}
className="flex gap-2 overflow-x-auto scrollbar-hide pb-0 px-4 md:pr-24"
className="flex gap-3 overflow-x-auto scrollbar-hide pb-0 px-4 md:w-[1240px] md:mx-auto"
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
>
{category.videos.map((video, index) => (
<div
key={video.id}
className="flex-shrink-0 w-[280px] sm:w-[320px] md:w-[320px] lg:w-[360px] xl:w-[380px] relative group hover:z-30"
className="flex-shrink-0 w-[280px] sm:w-[320px] md:w-[300px] lg:w-[300px] xl:w-[300px] relative group hover:z-30"
onMouseEnter={() => setClickedVideoId(video.id)}
>
{/* Top 10 Number overlay for first category */}
@ -279,7 +279,7 @@ function CategoryRow({ category, onVideoClick, hideScrollButtons = false }: Cate
</div>
{/* Navigation arrow at the end of each row - small square with arrow */}
<div className="absolute right-2 top-1/2 -translate-y-1/2 z-[40] block bg-red-500 p-2">
<div className="absolute right-2 top-1/2 -translate-y-1/2 z-[40] hidden md:block">
<Button
onClick={() => scroll('right')}
onMouseEnter={() => startAutoScroll('right')}

View File

@ -77,7 +77,7 @@ export default function Home() {
<div className="has-fixed-header lg:mx-[38px]" style={{minHeight: '100vh', background: 'linear-gradient(135deg, hsl(250, 50%, 15%) 0%, hsl(240, 30%, 25%) 100%)', color: 'white'}}>
{/* STICKY HEADER */}
<div className="header-sticky bg-transparent overflow-hidden">
<div className="max-w-7xl mx-auto px-4 py-4">
<div className="max-w-5xl mx-auto px-4 py-4">
<div className="flex items-center justify-between">
{/* Left side - Logo */}
<div className="flex items-center space-x-4">