Improve video display by unifying mobile and desktop layouts
Unify mobile and desktop layouts in `netflix-grid.tsx` by removing conditional rendering for different screen sizes and applying responsive styling directly. 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:
parent
f0a8358043
commit
645ac19776
@ -182,72 +182,36 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
|
|||||||
<div className="md:hidden absolute left-0 top-0 w-1/3 h-full z-20" onClick={() => scroll('left')} />
|
<div className="md:hidden absolute left-0 top-0 w-1/3 h-full z-20" onClick={() => scroll('left')} />
|
||||||
<div className="md:hidden absolute right-0 top-0 w-1/3 h-full z-20" onClick={() => scroll('right')} />
|
<div className="md:hidden absolute right-0 top-0 w-1/3 h-full z-20" onClick={() => scroll('right')} />
|
||||||
|
|
||||||
{/* Mobile: Single scrollable row */}
|
{/* Scrollable video row */}
|
||||||
<div className="md:hidden">
|
<div
|
||||||
<div
|
ref={scrollRef}
|
||||||
ref={scrollRef}
|
className="flex space-x-2 md:space-x-3 overflow-x-auto scrollbar-hide pb-4 scroll-smooth"
|
||||||
className="flex space-x-2 overflow-x-auto scrollbar-hide pb-4 scroll-smooth"
|
style={{
|
||||||
style={{
|
scrollbarWidth: 'none',
|
||||||
scrollbarWidth: 'none',
|
msOverflowStyle: 'none',
|
||||||
msOverflowStyle: 'none',
|
scrollBehavior: 'smooth',
|
||||||
scrollBehavior: 'smooth',
|
WebkitOverflowScrolling: 'touch'
|
||||||
WebkitOverflowScrolling: 'touch'
|
}}
|
||||||
}}
|
>
|
||||||
>
|
{category.videos.map((video, index) => (
|
||||||
{category.videos.map((video, index) => (
|
<div key={video.id} className="flex-shrink-0 w-28 md:w-52 relative group">
|
||||||
<div key={video.id} className="flex-shrink-0 w-28 relative group">
|
{/* Top 10 Number overlay for first category */}
|
||||||
{/* Top 10 Number overlay for first category */}
|
{category.title.includes("Top 10") && index < 10 && (
|
||||||
{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"
|
||||||
<div className="absolute top-1 left-1 z-20 text-white font-black text-3xl drop-shadow-2xl"
|
style={{
|
||||||
style={{
|
textShadow: '4px 4px 8px rgba(0,0,0,0.8), -2px -2px 4px rgba(0,0,0,0.6)',
|
||||||
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)'
|
||||||
WebkitTextStroke: '2px rgba(0,0,0,0.8)'
|
}}>
|
||||||
}}>
|
{index + 1}
|
||||||
{index + 1}
|
</div>
|
||||||
</div>
|
)}
|
||||||
)}
|
<VideoCard
|
||||||
<VideoCard
|
video={video}
|
||||||
video={video}
|
onClick={onVideoClick}
|
||||||
onClick={onVideoClick}
|
className="w-full hover:scale-105 hover:z-10 transition-all duration-300 group-hover:shadow-xl rounded-md overflow-hidden"
|
||||||
className="w-full hover:scale-105 hover:z-10 transition-all duration-300 group-hover:shadow-xl rounded-md overflow-hidden"
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
))}
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Desktop: Two rows grid */}
|
|
||||||
<div className="hidden md:block">
|
|
||||||
<div
|
|
||||||
ref={scrollRef}
|
|
||||||
className="grid grid-rows-2 grid-flow-col gap-3 overflow-x-auto scrollbar-hide pb-4 scroll-smooth auto-cols-[208px]"
|
|
||||||
style={{
|
|
||||||
scrollbarWidth: 'none',
|
|
||||||
msOverflowStyle: 'none',
|
|
||||||
scrollBehavior: 'smooth',
|
|
||||||
WebkitOverflowScrolling: 'touch'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{category.videos.map((video, index) => (
|
|
||||||
<div key={video.id} className="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-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)'
|
|
||||||
}}>
|
|
||||||
{index + 1}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<VideoCard
|
|
||||||
video={video}
|
|
||||||
onClick={onVideoClick}
|
|
||||||
className="w-full hover:scale-105 hover:z-10 transition-all duration-300 group-hover:shadow-xl rounded-md overflow-hidden"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user