Adjust video display to a vertical 9:16 aspect ratio

Updated grid and video card components to render videos with a 9:16 aspect ratio by modifying CSS classes and adjusting scroll amounts in the CategoryRow component.

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/gDXif4R
This commit is contained in:
sebastjanartic 2025-08-29 07:13:14 +00:00
parent 8ce0414679
commit 061b7854bf
2 changed files with 5 additions and 5 deletions

View File

@ -73,8 +73,8 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
<div className="h-6 bg-bunny-gray rounded w-48 animate-pulse"></div>
<div className="flex space-x-4 overflow-hidden">
{Array.from({ length: 6 }).map((_, index) => (
<div key={index} className="flex-shrink-0 w-64 animate-pulse">
<div className="bg-bunny-gray aspect-video rounded-xl mb-3"></div>
<div key={index} className="flex-shrink-0 w-56 animate-pulse">
<div className="bg-bunny-gray aspect-[9/16] rounded-xl mb-3"></div>
<div className="space-y-2">
<div className="h-4 bg-bunny-gray rounded w-3/4"></div>
<div className="h-3 bg-bunny-gray rounded w-1/2"></div>
@ -136,7 +136,7 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
const scroll = (direction: 'left' | 'right') => {
if (scrollRef.current) {
const scrollAmount = 320; // Width of card + gap
const scrollAmount = 240; // Width of card + gap
const currentScroll = scrollRef.current.scrollLeft;
const targetScroll = direction === 'left'
? currentScroll - scrollAmount
@ -181,7 +181,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-80 relative group">
<div key={video.id} className="flex-shrink-0 w-56 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-7xl drop-shadow-2xl"

View File

@ -49,7 +49,7 @@ export default function VideoCard({ video, onClick, className = "" }: VideoCardP
>
{/* Simple thumbnail with fallback - no HLS loading until needed */}
<div
className="relative gradient-card rounded-xl overflow-hidden mb-4 aspect-video cursor-pointer group"
className="relative gradient-card rounded-xl overflow-hidden mb-4 aspect-[9/16] cursor-pointer group"
onClick={() => onClick?.(video)}
>
<img