From 181738ae3f11eb6325a57387e10f3321574b1f10 Mon Sep 17 00:00:00 2001 From: Nathaniel Tampus Date: Thu, 2 Mar 2023 17:53:35 +0800 Subject: [PATCH] general layout improvements --- client/src/app/game/[code]/page.tsx | 61 +++++++++++++++++++---------- client/src/app/page.tsx | 55 +++++++++++++++----------- 2 files changed, 72 insertions(+), 44 deletions(-) diff --git a/client/src/app/game/[code]/page.tsx b/client/src/app/game/[code]/page.tsx index fdf3a4c..134ae52 100644 --- a/client/src/app/game/[code]/page.tsx +++ b/client/src/app/game/[code]/page.tsx @@ -5,12 +5,20 @@ import { Chessboard } from "react-chessboard"; import { IconCopy } from "@tabler/icons-react"; import Image from "next/image"; -const pgn = "1. e4 e5 2. f3 Nf6 3. d4 exd4 4. Qxd4 Nxe4 5. Qxe4+ Qe7 6. Qxe7+ Bxe7"; +const pgn = "1. e4 e5 2. f3 Nf6 3. d4 exd4 4. Qxd4 Nxe4 5. Qxe4+ Qe7 6. Qxe7+"; export default function Game() { return (
-
+
+ {/* overlay */} +
+
+ Waiting for opponent. + +
+
+ nize
+
vs
@@ -41,28 +50,31 @@ export default function Game() {
-
+
Invite friends: -
+
ches.su/game/123abc
-
- move list table - {pgn - .split(/\d+\./) - .filter((move) => move.trim() !== "") - .map((moveSet, i) => { - const moves = moveSet.trim().split(" "); - return ( -
-
{i + 1}
-
{moves[0]}
-
{moves[1]}
-
- ); - })} +
+ + + {pgn + .split(/\d+\./) + .filter((move) => move.trim() !== "") + .map((moveSet, i) => { + const moves = moveSet.trim().split(" "); + return ( + + + + + + ); + })} + +
{i + 1}.{moves[0]}{moves[1]}
@@ -70,10 +82,17 @@ export default function Game() {
chatbox - +
+ + +
-
observer list
+
Spectators: nize, nize, nize
); diff --git a/client/src/app/page.tsx b/client/src/app/page.tsx index e329214..56ef57c 100644 --- a/client/src/app/page.tsx +++ b/client/src/app/page.tsx @@ -2,35 +2,44 @@ import PublicGames from "@/components/PublicGames"; export default function Home() { return ( -
+
-
-

Join from invite

-
-
- - +
+
+

Join from invite

+
+
+ + +
+
or
-

Create game

-
- - -
- - +
+

Create game

+
+ + +
+ + +