From 4c2f5af0e339de4e75e34e91568a0e22638ed834 Mon Sep 17 00:00:00 2001 From: SibiAkkash Date: Sat, 13 Jan 2024 16:10:42 +0530 Subject: [PATCH 1/5] standings: Reduce padding for table cells --- frontend/src/components/Tournament.js | 38 ++++++++------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/frontend/src/components/Tournament.js b/frontend/src/components/Tournament.js index b2fa076f..8b1863ea 100644 --- a/frontend/src/components/Tournament.js +++ b/frontend/src/components/Tournament.js @@ -34,35 +34,19 @@ const TeamSeedingChange = props => { return ( -
- -
+
+ + {props.initialSeed - props.currentSeed} -
+
props.initialSeed}> -
- -
+
+ + {props.currentSeed - props.initialSeed} -
+
@@ -353,11 +337,11 @@ const Tournament = () => { {rank} - + { - + Date: Sun, 14 Jan 2024 20:26:52 +0530 Subject: [PATCH 2/5] tournament-page: Align tournament info section to the left - Left align title, status, info(image or location + date) - Add icons, skeletons for location and date --- frontend/src/components/Tournament.js | 136 ++++++++++++++++---------- 1 file changed, 84 insertions(+), 52 deletions(-) diff --git a/frontend/src/components/Tournament.js b/frontend/src/components/Tournament.js index 8b1863ea..d6617e31 100644 --- a/frontend/src/components/Tournament.js +++ b/frontend/src/components/Tournament.js @@ -2,7 +2,13 @@ import { A, useParams } from "@solidjs/router"; import { createQuery } from "@tanstack/solid-query"; import { initFlowbite } from "flowbite"; import { Icon } from "solid-heroicons"; -import { arrowSmallDown, arrowSmallUp, trophy } from "solid-heroicons/solid"; +import { + arrowSmallDown, + arrowSmallUp, + calendar, + mapPin, + trophy +} from "solid-heroicons/solid"; import { createEffect, createSignal, @@ -53,6 +59,55 @@ const TeamSeedingChange = props => { ); }; +const LocationAndDate = props => { + const startDate = () => + new Date(Date.parse(props.startDate)).toLocaleDateString("en-US", { + year: "numeric", + month: "short", + day: "numeric", + timeZone: "UTC" + }); + + const endDate = () => + new Date(Date.parse(props.endDate)).toLocaleDateString("en-US", { + year: "numeric", + month: "short", + day: "numeric", + timeZone: "UTC" + }); + + return ( +
+ + } + > +
+ + {props.location} +
+
+ + + } + > +
+ + + {startDate()} + + {" "} + to {endDate()} + + +
+
+
+ ); +}; const Tournament = () => { const params = useParams(); const [teamsMap, setTeamsMap] = createSignal({}); @@ -129,47 +184,38 @@ const Tournament = () => { pageList={[{ url: "/tournaments", name: "All Tournaments" }]} /> -

- - {tournamentQuery.data?.event?.title} - -

+ {/* Tournament title and status badge */} +
+
+ + + + Completed + + + + + Live + + + +
+

+ + {tournamentQuery.data?.event?.title} + +

+
+ {/* Tournament image or date+location */} -

- {tournamentQuery.data?.event?.location} -

-

- {new Date( - Date.parse(tournamentQuery.data?.event.start_date) - ).toLocaleDateString("en-US", { - year: "numeric", - month: "short", - day: "numeric", - timeZone: "UTC" - })} - - {" "} - to{" "} - {new Date( - Date.parse(tournamentQuery.data?.event.end_date) - ).toLocaleDateString("en-US", { - year: "numeric", - month: "short", - day: "numeric", - timeZone: "UTC" - })} - -

- + } >
@@ -186,20 +232,6 @@ const Tournament = () => {
-
- - - - Completed - - - - - Live - - - -
Date: Tue, 16 Jan 2024 20:57:43 +0530 Subject: [PATCH 3/5] standings: Left align standings tabs - Also fixed padding for initial and spirit standings --- frontend/src/components/Tournament.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/Tournament.js b/frontend/src/components/Tournament.js index d6617e31..898f3adc 100644 --- a/frontend/src/components/Tournament.js +++ b/frontend/src/components/Tournament.js @@ -291,16 +291,16 @@ const Tournament = () => {

Overall Standings

-