From dac2c566f9176df3a7c58bdc5ec0dd2c03b3ebe0 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Mon, 1 Sep 2025 19:47:24 +0000 Subject: [PATCH] Update homepage design and navigation for better user experience Refactors the homepage component (`home.tsx`) to improve its visual appearance and navigation. This includes replacing `NetflixGrid` with `VideoCard`, updating the header with a sticky effect, and restyling the search input and icon. 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 --- client/src/pages/home.tsx | 123 ++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 58 deletions(-) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 494112c..703de67 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from "react"; import { useQuery } from "@tanstack/react-query"; import { type Video } from "@shared/schema"; -import NetflixGrid from "@/components/netflix-grid"; +import VideoCard from "@/components/video-card"; import { Link } from "wouter"; import { Input } from "@/components/ui/input"; import { Search, Menu, X } from "lucide-react"; @@ -60,31 +60,33 @@ export default function Home() { } }, [searchQuery, refetch]); + const handleVideoClick = (video: Video) => { + window.location.href = `/video/${video.id}`; + }; + return ( -
- {/* STICKY HEADER */} -
+
+ {/* Header */} +
- {/* Left side - Logo */} -
- -
-
-
-

go4.video

- -
+ {/* Logo */} + +
+
+
+

go4.video

+ - {/* Right side - Navigation + Search */} -
+ {/* Navigation & Search */} +
{/* Desktop navigation */}
@@ -95,71 +97,76 @@ export default function Home() { placeholder="Videos suchen..." value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} - 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" + className="bg-white/10 border-white/20 text-white placeholder-white/50 w-64" /> - +
{/* Mobile menu button */}
-
- {/* Mobile menu dropdown */} - {isMobileMenuOpen && ( -
-
-
+
+ + {/* Main Content */} +
+ {isLoading ? ( +
+ {Array.from({ length: 18 }).map((_, index) => ( +
+
+
+
+
+
+
+ ))} +
+ ) : ( +
+ {allVideos.map((video) => ( + + ))}
)} -
-
-
- -
+ {allVideos.length === 0 && !isLoading && ( +
+
Keine Videos gefunden
+
+ )}
);