Update home page layout and styling for improved user experience

Refactors the home page by replacing the `VideoCard` component with `NetflixGrid`, updating header styling, and modifying input field appearance and positioning.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 890577b1-c154-40a4-a177-a0c6d55320c3
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/890577b1-c154-40a4-a177-a0c6d55320c3/iQc0AVS
This commit is contained in:
sebastjanartic 2025-09-01 19:51:53 +00:00
parent dac2c566f9
commit 53458a8372

View File

@ -1,7 +1,7 @@
import { useState, useEffect } from "react";
import { useQuery } from "@tanstack/react-query";
import { type Video } from "@shared/schema";
import VideoCard from "@/components/video-card";
import NetflixGrid from "@/components/netflix-grid";
import { Link } from "wouter";
import { Input } from "@/components/ui/input";
import { Search, Menu, X } from "lucide-react";
@ -60,33 +60,31 @@ export default function Home() {
}
}, [searchQuery, refetch]);
const handleVideoClick = (video: Video) => {
window.location.href = `/video/${video.id}`;
};
return (
<div style={{minHeight: '100vh', background: 'linear-gradient(135deg, hsl(250, 50%, 15%) 0%, hsl(240, 30%, 25%) 100%)', color: 'white'}}>
{/* Header */}
<header className="sticky top-0 z-50 bg-black/30 backdrop-blur-md border-b border-white/10">
<div className="has-fixed-header" style={{minHeight: '100vh', background: 'linear-gradient(135deg, hsl(250, 50%, 15%) 0%, hsl(240, 30%, 25%) 100%)', color: 'white'}}>
{/* STICKY HEADER */}
<div className="header-sticky bg-transparent overflow-hidden">
<div className="container py-4">
<div className="flex items-center justify-between">
{/* Logo */}
<Link href="/" className="flex items-center space-x-3">
<div className="w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center">
<div className="w-0 h-0 border-l-[12px] border-l-white border-y-[8px] border-y-transparent ml-1"></div>
</div>
<h1 className="text-2xl font-bold text-white">go4.video</h1>
</Link>
{/* Left side - Logo */}
<div className="flex items-center space-x-4">
<Link href="/" className="flex items-center space-x-2 hover:opacity-80 transition-opacity">
<div className="w-9 h-9 gradient-primary rounded-lg flex items-center justify-center shadow-lg">
<div className="w-0 h-0 border-l-[10px] border-l-white border-y-[7px] border-y-transparent ml-1"></div>
</div>
<h1 className="text-2xl font-bold text-white tracking-wide">go4.video</h1>
</Link>
</div>
{/* Navigation & Search */}
<div className="flex items-center gap-6">
{/* Right side - Navigation + Search */}
<div className="flex items-center gap-4">
{/* Desktop navigation */}
<div className="hidden md:flex items-center space-x-6">
<nav className="flex space-x-6">
<Link href="/" className="text-white/80 hover:text-white transition-colors">
<Link href="/" className="text-bunny-light hover:text-bunny-blue transition-colors">
Home
</Link>
<Link href="/folx-stadl" className="text-white/80 hover:text-white transition-colors">
<Link href="/folx-stadl" className="text-bunny-light hover:text-bunny-blue transition-colors">
FOLX STADL
</Link>
</nav>
@ -97,76 +95,71 @@ export default function Home() {
placeholder="Videos suchen..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="bg-white/10 border-white/20 text-white placeholder-white/50 w-64"
className="bg-white border border-gray-300 rounded-lg px-4 py-2 pl-10 text-sm text-gray-900 placeholder-gray-500 focus:outline-none focus:border-bunny-blue transition-colors w-64"
/>
<Search className="absolute right-3 top-1/2 transform -translate-y-1/2 text-white/50 w-4 h-4" />
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4" />
</div>
</div>
{/* Mobile menu button */}
<button
onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}
className="md:hidden p-2 text-white"
className="md:hidden p-2 rounded-lg bg-white/10 hover:bg-white/20 transition-colors"
data-testid="button-mobile-menu"
>
{isMobileMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
{isMobileMenuOpen ? (
<X className="w-6 h-6 text-white" />
) : (
<Menu className="w-6 h-6 text-white" />
)}
</button>
</div>
</div>
</div>
{/* Mobile Menu */}
{isMobileMenuOpen && (
<div className="md:hidden mt-4 pt-4 border-t border-white/20">
<nav className="flex flex-col space-y-3 mb-4">
<Link href="/" className="text-white/80 hover:text-white">Home</Link>
<Link href="/folx-stadl" className="text-white/80 hover:text-white">FOLX STADL</Link>
{/* Mobile menu dropdown */}
{isMobileMenuOpen && (
<div className="md:hidden border-t border-white/20 bg-bunny-dark/95 backdrop-blur-md">
<div className="px-4 py-3">
<nav className="flex space-x-6 mb-3">
<Link
href="/"
className="text-bunny-light hover:text-bunny-blue transition-colors text-sm font-medium"
onClick={() => setIsMobileMenuOpen(false)}
>
Home
</Link>
<Link
href="/folx-stadl"
className="text-bunny-light hover:text-bunny-blue transition-colors text-sm font-medium"
onClick={() => setIsMobileMenuOpen(false)}
>
FOLX STADL
</Link>
</nav>
<div className="relative">
<Input
type="search"
placeholder="Suchen..."
placeholder="Search..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="bg-white/10 border-white/20 text-white placeholder-white/50 w-full"
className="bg-white border border-gray-300 rounded-lg px-3 py-2 pl-9 text-sm text-gray-900 placeholder-gray-500 focus:outline-none focus:border-bunny-blue transition-colors w-full"
/>
<Search className="absolute right-3 top-1/2 transform -translate-y-1/2 text-white/50 w-4 h-4" />
<Search className="absolute left-2.5 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4" />
</div>
</div>
)}
</div>
)}
</div>
<main className="w-full pt-0 pb-8 relative">
<div className="container">
<NetflixGrid
videos={allVideos}
isLoading={isLoading}
/>
</div>
</header>
{/* Main Content */}
<main className="container py-8">
{isLoading ? (
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4">
{Array.from({ length: 18 }).map((_, index) => (
<div key={index} className="animate-pulse">
<div className="bg-white/10 aspect-video rounded-lg mb-3"></div>
<div className="space-y-2">
<div className="h-4 bg-white/10 rounded w-3/4"></div>
<div className="h-3 bg-white/10 rounded w-1/2"></div>
</div>
</div>
))}
</div>
) : (
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4">
{allVideos.map((video) => (
<VideoCard
key={video.id}
video={video}
onClick={handleVideoClick}
className="hover:scale-105 transition-transform duration-200"
/>
))}
</div>
)}
{allVideos.length === 0 && !isLoading && (
<div className="text-center py-12">
<div className="text-white/60 text-lg">Keine Videos gefunden</div>
</div>
)}
</main>
</div>
);