Skip to content

Commit b1b8b13

Browse files
committed
Merge remote-tracking branch 'origin/main' into issue-46-Admin_Improve_experience_of_entering_Match_Results
2 parents 2341144 + a15df14 commit b1b8b13

20 files changed

Lines changed: 352 additions & 132 deletions

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"typescript.tsdk": "${workspaceFolder}/client/node_modules/typescript/lib",
1010
"shellcheck.ignorePatterns": {
1111
"**/.env*": true
12-
}
12+
},
13+
"editor.formatOnSave": true
1314
}

client/public/aicodeLogo.png

57.8 KB
Loading

client/public/drone.jpg

303 KB
Loading

client/public/squadroneLogo.png

63.6 KB
Loading

client/src/components/ui/FormatRules/CheckList.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const CheckList: React.FC = () => {
5858
const completionPercentage = (completedCount / items.length) * 100;
5959

6060
return (
61-
<section className="mx-auto max-w-md">
61+
<section className="mx-auto">
6262
{/* Main Card Container */}
6363
<div className="overflow-hidden rounded-2xl border border-gray-100 bg-white shadow-lg">
6464
{/* Header Section */}
@@ -146,11 +146,11 @@ const CheckList: React.FC = () => {
146146
{/* Footer Section */}
147147
{completionPercentage === 100 && (
148148
<div className="border-t border-green-100 bg-gradient-to-r from-green-50 to-emerald-50 px-6 py-4">
149-
<div className="flex items-center gap-3">
150-
<div className="flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-green-600">
149+
<div className="flex place-content-center items-center gap-6 align-middle">
150+
<div className="flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-green-600">
151151
<CheckmarkIcon />
152152
</div>
153-
<div>
153+
<div className="px-auto">
154154
<p className="body-lg text-green-800">
155155
Equipment ready! Your drone meets all requirements
156156
</p>

client/src/components/ui/SchedulePage/EventCard.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function EventCard({
1818
imageSrc,
1919
}: EventCardProps) {
2020
return (
21-
<div className="mb-14 flex items-start gap-4 rounded-3xl bg-gray-100 p-6">
21+
<div className="mb-14 flex flex-col items-center gap-4 rounded-3xl bg-gray-100 p-6 sm:flex-row">
2222
{/* Text */}
2323
<div className="min-w-0 flex-[5] pr-4 pt-2">
2424
<p className="body-lg mb-1 text-secondary">{date}</p>
@@ -65,13 +65,14 @@ export default function EventCard({
6565
<p className="line-clamp-3 text-text">{description}</p>
6666
</div>
6767
{/* Image */}
68-
<div className="relative h-[333px] min-w-[411px] flex-[3]">
68+
<div className="relative aspect-[411/333] w-full max-w-xs flex-[3] sm:max-w-sm md:max-w-md lg:max-w-lg">
6969
<Image
7070
src={imageSrc}
71-
alt="placeholder-svg"
71+
alt="Event image"
7272
fill
7373
className="rounded-2xl object-cover"
7474
priority
75+
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
7576
/>
7677
</div>
7778
</div>

client/src/components/ui/SchedulePage/index.tsx

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
11
import Image from "next/image";
22

3+
import ProgressBar from "../progress";
34
import EventCard from "./EventCard";
45

56
export default function SchedulePage() {
67
return (
7-
<div>
8-
<h1 className="title-large text-center font-bold text-dark">
9-
{" "}
10-
Drone Competition Schedule{" "}
11-
</h1>
12-
<div className="relative mx-auto h-[80px] w-[1100px]">
13-
<Image
14-
src="/ProgressBar1.svg"
15-
alt="Progress Bar"
16-
fill
17-
className="object-contain"
18-
priority
19-
/>
20-
</div>
8+
<div className="container mx-auto px-4 py-8">
9+
<ProgressBar pageName="schedule" />
10+
2111
<p className="medium-lg pt-8">Our next competition is: </p>
2212
<p className="subtitle pb-8 font-bold">Monday - July 9th, 2025</p>
2313

@@ -27,7 +17,7 @@ export default function SchedulePage() {
2717
location="Melbourne Convention Centre"
2818
time="5:00pm - 8:00pm"
2919
description="The first stage of the competition kicks off with teams battling it out in the group round."
30-
imageSrc="/drone.svg"
20+
imageSrc="/drone.jpg"
3121
/>
3222

3323
<EventCard
@@ -36,15 +26,15 @@ export default function SchedulePage() {
3626
location="Murdoch University"
3727
time="1:00pm - 4:00pm"
3828
description="Knock out each other!"
39-
imageSrc="/drone.svg"
29+
imageSrc="/drone.jpg"
4030
/>
4131
<EventCard
4232
date="Wednesday - 11 July 2025"
4333
title="Finals Day"
4434
location="Location"
4535
time="5:00pm - 8:00pm"
4636
description="The final match to determine the drone champion of 2025!"
47-
imageSrc="/drone.svg"
37+
imageSrc="/drone.jpg"
4838
/>
4939
</div>
5040
);

client/src/components/ui/footer.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,10 @@ import { useRouter } from "next/router";
44
import * as React from "react";
55
import { FaFacebookF, FaInstagram } from "react-icons/fa";
66

7+
import { navlinks } from "@/lib/constants";
8+
79
export default function Footer() {
810
const router = useRouter();
9-
type NavLink = {
10-
label: string;
11-
href: string;
12-
};
13-
const navlinks: NavLink[] = [
14-
{ label: "Home", href: "/" },
15-
{ label: "Schedule", href: "/schedule" },
16-
{ label: "Format & Rules", href: "/format-rules" },
17-
{ label: "Guests & Sponsors", href: "/guests-sponsors" },
18-
{ label: "Leaderboard", href: "/leaderboard" },
19-
];
2011
return (
2112
<footer className="bg-dark px-6 py-12 text-light">
2213
<div className="mx-auto max-w-7xl">

client/src/components/ui/navbar.tsx

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,45 @@ import { useRouter } from "next/router";
44
import { useState } from "react";
55
import { FiAlignJustify, FiX } from "react-icons/fi";
66

7+
import { navlinks } from "@/lib/constants";
8+
79
export default function Navbar() {
810
const router = useRouter();
911
const [menuOpen, setMenuOpen] = useState(false);
10-
type NavLink = {
11-
label: string;
12-
href: string;
13-
};
14-
const navlinks: NavLink[] = [
15-
{ label: "Home", href: "/" },
16-
{ label: "Schedule", href: "/schedule" },
17-
{ label: "Format & Rules", href: "/format-rules" },
18-
{ label: "Guests & Sponsors", href: "/guests-sponsors" },
19-
{ label: "Leaderboard", href: "/leaderboard" },
20-
];
12+
2113
const handleNav = () => {
2214
setMenuOpen(!menuOpen);
2315
};
2416
return (
25-
<div className="fixed left-0 right-0 top-0 h-16 w-full bg-light">
17+
<div className="fixed left-0 right-0 top-0 z-50 h-16 w-full bg-white shadow">
2618
<nav className="medium-sm mx-auto flex h-full max-w-7xl items-center justify-between">
2719
{/* Logo container */}
2820
<div className="relative mx-10 flex h-10 w-28 items-center">
29-
<Image
21+
<p>Logo</p>
22+
{/* <Image
3023
className="object-contain"
3124
src="https://squadrone.com.au/wp-content/uploads/2024/11/squadrone-logo-01-scaled.webp"
3225
alt="Squadrone Logo"
3326
width={2560}
3427
height={889}
35-
/>
28+
/> */}
3629
</div>
3730

3831
{/* Navbar options/links container */}
39-
<div className="hidden items-center gap-8 lg:flex">
40-
{navlinks.map((link) => {
41-
if (link.label === "Leaderboard") {
42-
return (
43-
<Link
44-
className="btn-primary mr-10"
45-
key={link.href}
46-
href={link.href}
47-
>
48-
View Leaderboard
49-
</Link>
50-
);
51-
}
52-
return (
53-
<Link
54-
key={link.href}
55-
href={link.href}
56-
className={
57-
router.pathname === link.href ? "nav-link-active" : "nav-link"
58-
}
59-
>
60-
{link.label}
61-
</Link>
62-
);
63-
})}
32+
<div className="hidden items-center gap-8 pr-6 lg:flex">
33+
{navlinks.map((link) => (
34+
<Link
35+
key={link.href}
36+
href={link.href}
37+
className={
38+
router.pathname === link.href
39+
? "nav-link-active"
40+
: "nav-link-base"
41+
}
42+
>
43+
{link.label}
44+
</Link>
45+
))}
6446
</div>
6547
{/* Mobile navbar */}
6648
<button onClick={handleNav} className="mr-5 lg:hidden">

client/src/components/ui/progress.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function ProgressBar({ pageName }: { pageName: string }) {
88
switch (pageName) {
99
case "schedule":
1010
progress = 0;
11-
titleName = "Schedule";
11+
titleName = "Drone Competition Schedule";
1212
break;
1313
case "format-rules":
1414
progress = 25;
@@ -28,7 +28,9 @@ export default function ProgressBar({ pageName }: { pageName: string }) {
2828
<div>
2929
<div className="customerBar w-full flex-col justify-center gap-2">
3030
<div className="mb-10 flex items-center justify-center">
31-
<a className="title-large">{titleName}</a>
31+
<a className="title-large text-center text-[2.5rem] font-bold text-dark">
32+
{titleName}
33+
</a>
3234
</div>
3335
<div className="flex flex-1">
3436
<div

0 commit comments

Comments
 (0)