Adjust video card sizes for a more compact display

Update client/src/components/netflix-grid.tsx to reduce the width of video cards and adjust scroll amounts for a more compact grid layout, particularly on mobile devices.

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/P3O2FU7
This commit is contained in:
sebastjanartic 2025-08-29 10:16:00 +00:00
parent a72037b423
commit 015466d2e7

View File

@ -136,9 +136,9 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
const scroll = (direction: 'left' | 'right') => {
if (scrollRef.current) {
// Responsive scroll amount - smaller cards for Netflix style
// Responsive scroll amount - extra small cards for Netflix style
const isMobile = window.innerWidth < 768;
const scrollAmount = isMobile ? 180 : 280; // Mobile: 176px + gap, Desktop: 256px + gap
const scrollAmount = isMobile ? 150 : 220; // Mobile: 144px + gap, Desktop: 208px + gap
const currentScroll = scrollRef.current.scrollLeft;
const targetScroll = direction === 'left'
? currentScroll - scrollAmount
@ -183,7 +183,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
>
{category.videos.map((video, index) => (
<div key={video.id} className="flex-shrink-0 w-44 md:w-64 relative group">
<div key={video.id} className="flex-shrink-0 w-36 md:w-52 relative group">
{/* Top 10 Number overlay for first category */}
{category.title.includes("Top 10") && index < 10 && (
<div className="absolute top-1 left-1 z-20 text-white font-black text-3xl md:text-5xl drop-shadow-2xl"