From 02dd3869d32a1772a4f337204f844e0d41ec2b93 Mon Sep 17 00:00:00 2001 From: jessy-david-dev Date: Fri, 10 Apr 2026 19:04:52 +0200 Subject: [PATCH] fix(responsive): full mobile-first pass on all screens, fix join button layout --- app/components/GameScreen.tsx | 79 ++++++++-------- app/components/HomeScreen.tsx | 129 ++++++++++++--------------- app/components/LeaderboardScreen.tsx | 51 +++++------ app/components/LobbyScreen.tsx | 65 +++++--------- app/components/ProfileScreen.tsx | 94 ++++++++++--------- app/components/SoloScreen.tsx | 71 +++++++-------- 6 files changed, 223 insertions(+), 266 deletions(-) diff --git a/app/components/GameScreen.tsx b/app/components/GameScreen.tsx index a235729..0438dc7 100644 --- a/app/components/GameScreen.tsx +++ b/app/components/GameScreen.tsx @@ -36,49 +36,48 @@ export function GameScreen({ breadcrumbEndRef.current?.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "end" }); }, [history]); + const btnPrimary = "w-full min-h-11 px-5 rounded-xl text-sm font-semibold bg-[#7c3aed] text-white hover:bg-[#6d28d9] cursor-pointer transition-colors"; + const btnGhost = "w-full min-h-11 px-5 rounded-xl text-sm font-semibold bg-[#242424] border border-[#2e2e2e] text-[#f0f0f0] hover:bg-[#1a1a1a] cursor-pointer transition-colors"; + // Results if (room.phase === "results") return ( -
-
-
+
+
+
{winner ? ( <> -
🏆
-
{winner.name} a gagné la manche !
+
🏆
+
{winner.name} a gagné la manche !
) : ( -
Manche terminée !
+
Manche terminée !
)}
-
+
{room.startArticle} {room.targetArticle}
-

Classement

+

Classement

    {sortedPlayers.map((p, i) => ( -
  • - #{i + 1} - {p.name} - {p.hasWon && Gagnant} - {p.score} pts +
  • + #{i + 1} + {p.name} + {p.hasWon && Gagnant} + {p.score} pts
  • ))}
{isHost ? (
- - + +
) : ( -

En attente de l'hôte...

+

En attente de l'hôte...

)}
@@ -86,20 +85,20 @@ export function GameScreen({ // Countdown if (room.phase === "countdown") return ( -
-
-
+
+
+
- Départ - {room.startArticle} + Départ + {room.startArticle}
- +
- Cible - {room.targetArticle} + Cible + {room.targetArticle}
-
+
{countdown !== null && countdown > 0 ? countdown : "Partez !"}
@@ -110,22 +109,22 @@ export function GameScreen({ return (
{/* Topbar */} -
-
+
+
- Cible + Cible {room.targetArticle}
-
+
{elapsed} {clicks} clics - {myPlayer?.score ?? 0} pts + {myPlayer?.score ?? 0} pts
- {/* Content + sidebar */} + {/* Content */}
{loading && ( @@ -135,7 +134,7 @@ export function GameScreen({ )} {loadError && (
-

{loadError}

+

{loadError}

@@ -149,15 +148,15 @@ export function GameScreen({ )}
- {/* Sidebar joueurs */} -