From e2bb137f56c16b956746ab7049184db9d51db7e5 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Fri, 29 Aug 2025 08:45:52 +0000 Subject: [PATCH] Improve video display and navigation on various screen sizes Adjusts card aspect ratios and scroll amounts in `netflix-grid.tsx` and `video-card.tsx` to enhance responsiveness. Updates scroll logic in `CategoryRow.tsx` for better mobile/desktop handling and resizes the "Top 10" overlay text. 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/xF0EUqR --- client/src/components/netflix-grid.tsx | 12 +++++++----- client/src/components/video-card.tsx | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index de903f4..e149b07 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -73,8 +73,8 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
{Array.from({ length: 6 }).map((_, index) => ( -
-
+
+
@@ -136,7 +136,9 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { const scroll = (direction: 'left' | 'right') => { if (scrollRef.current) { - const scrollAmount = 240; // Width of card + gap + // Responsive scroll amount - wider cards on desktop + const isMobile = window.innerWidth < 768; + const scrollAmount = isMobile ? 240 : 336; // Mobile: 224px + gap, Desktop: 320px + gap const currentScroll = scrollRef.current.scrollLeft; const targetScroll = direction === 'left' ? currentScroll - scrollAmount @@ -181,10 +183,10 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) { style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }} > {category.videos.map((video, index) => ( -
+
{/* Top 10 Number overlay for first category */} {category.title.includes("Top 10") && index < 10 && ( -
{/* Simple thumbnail with fallback - no HLS loading until needed */}
onClick?.(video)} >