Skip to content

Commit 973fe78

Browse files
committed
Add Styling Changes for schedule
Add resizable container as well as the ProgressBar component to the schedule page Changed various padding, and responsiveness for mobile for the EventCard, as well as changing the title inside the ProgressBar
1 parent 7cf0d92 commit 973fe78

5 files changed

Lines changed: 17 additions & 24 deletions

File tree

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/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

client/src/pages/format-rules.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const FormatRulesPage: NextPage = () => {
102102
{/* Navbar is still included from _app.tsx line 46 */}
103103

104104
{/* Main Content - Add pt-20 to avoid being blocked by fixed navbar */}
105-
<main className="container mx-auto px-4 py-8 pt-10 md:pt-20">
105+
<main className="container mx-auto px-4 py-8 pt-10 md:pt-12">
106106
<div className="mx-auto px-5 py-10 md:px-12">
107107
{/* Hero Section */}
108108
<div className="mb-8 text-center">

client/src/pages/schedule.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function Schedule() {
1313
return (
1414
<main
1515
className={cn(
16-
"flex min-h-screen flex-col items-center gap-4 bg-light p-24 font-sans",
16+
"md:pt-15 flex min-h-screen flex-col items-center gap-4 bg-light px-4 py-10 pt-4 font-sans md:px-12",
1717
fontSans.variable,
1818
)}
1919
>

0 commit comments

Comments
 (0)