Improve layout stability by setting fixed minimum heights for all widgets

Applies a fixed `min-height` to various widgets (BreakingNewsWidget, HoroscopeWidget, NewsWidget, PhotoGalleryWidget, RecipeWidget, SidebarWeatherWidget) to prevent content shifting and ensure a stable layout, especially on mobile devices.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 7f217468-f37a-450b-813e-25faac95a285
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/EtK2Sno
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic 2026-03-05 09:53:39 +00:00
parent a1686482a4
commit 12b8af827a
6 changed files with 8 additions and 8 deletions

View File

@ -40,7 +40,7 @@ export function BreakingNewsWidget() {
return (
<div
className="bg-card rounded-lg border border-card-border overflow-hidden h-full flex flex-col"
className="bg-card rounded-lg border border-card-border overflow-hidden h-full flex flex-col min-h-[320px]"
onMouseEnter={() => setPaused(true)}
onMouseLeave={() => setPaused(false)}
data-testid="widget-breaking-news"

View File

@ -32,7 +32,7 @@ export function HoroscopeWidget() {
return (
<div
className="rounded-lg border border-card-border overflow-hidden h-full w-full cursor-pointer group hover:border-primary/50 transition-colors flex flex-col"
className="rounded-lg border border-card-border overflow-hidden h-full w-full cursor-pointer group hover:border-primary/50 transition-colors flex flex-col min-h-[320px]"
style={{ background: "linear-gradient(135deg, hsl(250 30% 14%), hsl(270 25% 10%))" }}
onMouseEnter={() => setPaused(true)}
onMouseLeave={() => setPaused(false)}

View File

@ -40,7 +40,7 @@ export function NewsWidget() {
return (
<div
className="bg-card rounded-lg border border-card-border overflow-hidden h-full flex flex-col"
className="bg-card rounded-lg border border-card-border overflow-hidden h-full flex flex-col min-h-[320px]"
onMouseEnter={() => setPaused(true)}
onMouseLeave={() => setPaused(false)}
data-testid="widget-news"

View File

@ -233,12 +233,12 @@ export function PhotoGalleryWidget({ reverseOrder = false }: { reverseOrder?: bo
if (isLoading) {
return (
<div className="bg-card rounded-lg border border-card-border overflow-hidden h-full" data-testid="widget-gallery-loading">
<div className="bg-card rounded-lg border border-card-border overflow-hidden h-full min-h-[320px]" data-testid="widget-gallery-loading">
<div className="p-3 flex items-center gap-2 border-b border-card-border">
<Images className="w-4 h-4 text-primary" />
<h3 className="font-bold text-card-foreground text-sm">Fotogalerie</h3>
</div>
<div className="aspect-[4/5] bg-muted animate-pulse" />
<div className="flex-1 bg-muted animate-pulse min-h-[280px]" />
</div>
);
}
@ -247,7 +247,7 @@ export function PhotoGalleryWidget({ reverseOrder = false }: { reverseOrder?: bo
return (
<>
<div className="bg-card rounded-lg border border-card-border overflow-hidden h-full flex flex-col" data-testid="widget-gallery">
<div className="bg-card rounded-lg border border-card-border overflow-hidden h-full flex flex-col min-h-[320px]" data-testid="widget-gallery">
<div className="p-3 flex items-center gap-2 border-b border-card-border flex-shrink-0">
<Images className="w-4 h-4 text-primary" />
<h3 className="font-bold text-card-foreground text-sm">Fotogalerie</h3>

View File

@ -28,7 +28,7 @@ export function RecipeWidget() {
return (
<button
onClick={() => navigate("/rezepte")}
className="bg-card rounded-lg border border-card-border overflow-hidden h-full w-full text-left cursor-pointer group hover:border-primary/50 transition-colors flex flex-col"
className="bg-card rounded-lg border border-card-border overflow-hidden h-full w-full text-left cursor-pointer group hover:border-primary/50 transition-colors flex flex-col min-h-[320px]"
data-testid="widget-recipe"
>
<div className="p-3 flex items-center gap-2 border-b border-card-border flex-shrink-0">

View File

@ -200,7 +200,7 @@ export function SidebarWeatherWidget() {
if (loading) {
return (
<div className="bg-card rounded-lg border border-card-border p-4 aspect-square flex items-center justify-center" data-testid="sidebar-weather-loading">
<div className="bg-card rounded-lg border border-card-border p-4 min-h-[280px] flex items-center justify-center" data-testid="sidebar-weather-loading">
<div className="w-full h-full bg-muted animate-pulse rounded" />
</div>
);