Adjust video display to resemble Netflix layout

Update `netflix-grid.tsx` and `video-card.tsx` to adjust spacing, card widths, and hover effects, mimicking the visual style of Netflix for a more familiar user experience.

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:15:20 +00:00
parent f65b176868
commit a72037b423
2 changed files with 8 additions and 8 deletions

View File

@ -136,9 +136,9 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
const scroll = (direction: 'left' | 'right') => {
if (scrollRef.current) {
// Responsive scroll amount - wider cards on desktop
// Responsive scroll amount - smaller cards for Netflix style
const isMobile = window.innerWidth < 768;
const scrollAmount = isMobile ? 240 : 336; // Mobile: 224px + gap, Desktop: 320px + gap
const scrollAmount = isMobile ? 180 : 280; // Mobile: 176px + gap, Desktop: 256px + gap
const currentScroll = scrollRef.current.scrollLeft;
const targetScroll = direction === 'left'
? currentScroll - scrollAmount
@ -179,14 +179,14 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
{/* Scrollable video row */}
<div
ref={scrollRef}
className="flex space-x-4 overflow-x-auto scrollbar-hide pb-4"
className="flex space-x-2 md:space-x-3 overflow-x-auto scrollbar-hide pb-4"
style={{ scrollbarWidth: 'none', msOverflowStyle: 'none' }}
>
{category.videos.map((video, index) => (
<div key={video.id} className="flex-shrink-0 w-56 md:w-80 relative group">
<div key={video.id} className="flex-shrink-0 w-44 md:w-64 relative group">
{/* Top 10 Number overlay for first category */}
{category.title.includes("Top 10") && index < 10 && (
<div className="absolute top-2 left-2 z-20 text-white font-black text-5xl md:text-7xl drop-shadow-2xl"
<div className="absolute top-1 left-1 z-20 text-white font-black text-3xl md:text-5xl drop-shadow-2xl"
style={{
textShadow: '4px 4px 8px rgba(0,0,0,0.8), -2px -2px 4px rgba(0,0,0,0.6)',
WebkitTextStroke: '2px rgba(0,0,0,0.8)'
@ -197,7 +197,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
<VideoCard
video={video}
onClick={onVideoClick}
className="w-full hover:scale-110 hover:z-10 transition-all duration-500 group-hover:shadow-2xl rounded-lg overflow-hidden"
className="w-full hover:scale-105 hover:z-10 transition-all duration-300 group-hover:shadow-xl rounded-md overflow-hidden"
/>
</div>
))}

View File

@ -127,13 +127,13 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
return (
<div
data-testid={`card-video-${video.id}`}
className={`video-card transition-transform duration-200 hover:scale-[1.02] p-3 ${className}`}
className={`video-card transition-transform duration-200 hover:scale-[1.02] p-1 md:p-2 ${className}`}
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
{/* Video preview container */}
<div
className="relative gradient-card rounded-xl overflow-hidden mb-4 aspect-[9/16] md:aspect-[16/9] cursor-pointer group"
className="relative gradient-card rounded-lg overflow-hidden mb-2 aspect-[9/16] md:aspect-[16/9] cursor-pointer group"
onClick={() => onClick?.(video)}
>
{/* Static thumbnail - always visible */}