File tree Expand file tree Collapse file tree
components/ui/SchedulePage Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import Image from "next/image" ;
2+
3+ type EventCardProps = {
4+ date : string ;
5+ title : string ;
6+ location : string ;
7+ time : string ;
8+ description : string ;
9+ imageSrc : string ;
10+ } ;
11+
12+ export default function EventCard ( {
13+ date,
14+ title,
15+ location,
16+ time,
17+ description,
18+ imageSrc,
19+ } : EventCardProps ) {
20+ return (
21+ < div className = "mb-14 flex items-start gap-4 rounded-3xl bg-gray-100 p-6" >
22+ { /* Text */ }
23+ < div className = "min-w-0 flex-[5] pr-4 pt-2" >
24+ < p className = "body-lg mb-1 text-secondary" > { date } </ p >
25+ < h2 className = "subtitle mb-3" > { title } </ h2 >
26+ < div className = "mb-3 flex items-center gap-2" >
27+ < svg
28+ xmlns = "http://www.w3.org/2000/svg"
29+ fill = "none"
30+ viewBox = "0 0 24 24"
31+ strokeWidth = { 1.5 }
32+ stroke = "currentColor"
33+ className = "size-5 flex-shrink-0 text-secondary"
34+ >
35+ < path
36+ strokeLinecap = "round"
37+ strokeLinejoin = "round"
38+ d = "M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
39+ />
40+ < path
41+ strokeLinecap = "round"
42+ strokeLinejoin = "round"
43+ d = "M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"
44+ />
45+ </ svg >
46+ < p className = "text-text" > { location } </ p >
47+ </ div >
48+ < div className = "mb-3 flex items-center gap-2" >
49+ < svg
50+ xmlns = "http://www.w3.org/2000/svg"
51+ fill = "none"
52+ viewBox = "0 0 24 24"
53+ strokeWidth = { 1.5 }
54+ stroke = "currentColor"
55+ className = "size-5 flex-shrink-0 text-secondary"
56+ >
57+ < path
58+ strokeLinecap = "round"
59+ strokeLinejoin = "round"
60+ d = "M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
61+ />
62+ </ svg >
63+ < p className = "text-text" > { time } </ p >
64+ </ div >
65+ < p className = "line-clamp-3 text-text" > { description } </ p >
66+ </ div >
67+ { /* Image */ }
68+ < div className = "relative h-[333px] min-w-[411px] flex-[3]" >
69+ < Image
70+ src = { imageSrc }
71+ alt = "placeholder-svg"
72+ fill
73+ className = "rounded-2xl object-cover"
74+ priority
75+ />
76+ </ div >
77+ </ div >
78+ ) ;
79+ }
Original file line number Diff line number Diff line change 1+ import Image from "next/image" ;
2+
3+ import EventCard from "./EventCard" ;
4+
5+ export default function SchedulePage ( ) {
6+ 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 >
21+ < p className = "medium-lg pt-8" > Our next competition is: </ p >
22+ < p className = "subtitle pb-8 font-bold" > Monday - July 9th, 2025</ p >
23+
24+ < EventCard
25+ date = "Monday - 9 July 2025"
26+ title = "Group Stages Start"
27+ location = "Melbourne Convention Centre"
28+ time = "5:00pm - 8:00pm"
29+ description = "The first stage of the competition kicks off with teams battling it out in the group round."
30+ imageSrc = "/drone.svg"
31+ />
32+
33+ < EventCard
34+ date = "Tuesday - 10 July 2025"
35+ title = "Knockout Stages Start"
36+ location = "Murdoch University"
37+ time = "1:00pm - 4:00pm"
38+ description = "Knock out each other!"
39+ imageSrc = "/drone.svg"
40+ />
41+ < EventCard
42+ date = "Wednesday - 11 July 2025"
43+ title = "Finals Day"
44+ location = "Location"
45+ time = "5:00pm - 8:00pm"
46+ description = "The final match to determine the drone champion of 2025!"
47+ imageSrc = "/drone.svg"
48+ />
49+ </ div >
50+ ) ;
51+ }
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import type { AppProps } from "next/app";
66import { Montserrat , Plus_Jakarta_Sans , Work_Sans } from "next/font/google" ;
77
88import Footer from "../components/ui/footer" ;
9- import Navbar from "../components/ui/navbar" ;
109
1110const fontMontserrat = Montserrat ( {
1211 subsets : [ "latin" ] ,
Original file line number Diff line number Diff line change 1- import { useState } from "react " ;
1+ import { Inter as FontSans } from "next/font/google " ;
22
3- import { usePings } from "@/hooks/pings " ;
3+ import { cn } from "@/lib/utils " ;
44
5- import { Button } from "../components/ui/button " ;
5+ import SchedulePage from "../components/ui/SchedulePage " ;
66
7- export default function Home ( ) {
8- const [ clicked , setClicked ] = useState ( false ) ;
9- const { data, isLoading } = usePings ( {
10- enabled : clicked ,
11- } ) ;
7+ const fontSans = FontSans ( {
8+ subsets : [ "latin" ] ,
9+ variable : "--font-sans" ,
10+ } ) ;
1211
12+ export default function Schedule ( ) {
1313 return (
14- < >
15- < h1 className = "title-large text-dark" > Title Test</ h1 >
16- < Button onClick = { ( ) => setClicked ( true ) } >
17- { isLoading ? "Loading" : "Ping" }
18- </ Button >
19- < p >
20- Response from server: < span > { data as string } </ span >
21- </ p >
22- </ >
14+ < main
15+ className = { cn (
16+ "flex min-h-screen flex-col items-center gap-4 bg-light p-24 font-sans" ,
17+ fontSans . variable ,
18+ ) }
19+ >
20+ < SchedulePage />
21+ </ main >
2322 ) ;
2423}
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ from rest_framework import serializers
2+ from .models import Match , Team
3+
4+
5+ class TeamSerializer (serializers .ModelSerializer ):
6+ class Meta :
7+ model = Team
8+ fields = "__all__"
9+ read_only_field = "team_id"
10+
11+
12+ class MatchSerializer (serializers .ModelSerializer ):
13+ class Meta :
14+ model = Match
15+ fields = "__all__"
16+ read_only_field = "match_id"
17+
18+
19+ class GroupSerializer (serializers .Serializer ):
20+ group = serializers .IntegerField ()
21+ team = serializers .IntegerField ()
22+ team_name = serializers .CharField (max_length = 64 )
23+ total_points = serializers .IntegerField ()
Original file line number Diff line number Diff line change 1+ from django .urls import path , include
2+ from rest_framework .routers import DefaultRouter
3+ from .views import MatchViewSet , TeamViewSet , GroupViewSet
4+
5+ router = DefaultRouter ()
6+ router .register (r'matches' , MatchViewSet , basename = 'match' )
7+ router .register (r'teams' , TeamViewSet , basename = 'team' )
8+ router .register (r'groups' , GroupViewSet , basename = 'group' )
19
2- app_name = "match"
310urlpatterns = [
11+ path ('' , include (router .urls )),
412]
You can’t perform that action at this time.
0 commit comments