-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
223 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+635 KB
public/events/june/directions/End of walkway 2_ Before Escalator to NAKA.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.16 MB
public/events/june/directions/To NAKA from Bus Stop_ Lib pick up.webp
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+676 KB
public/events/june/directions/Walkway From Bras Basah Exit C _ Bencoolen Exit C.webp
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; | ||
import { Button } from "@/components/ui/button"; | ||
import confetti from 'canvas-confetti'; | ||
|
||
export default function DirectionList() { | ||
const directions = [ | ||
{ | ||
title: "Day 1", | ||
methods: [ | ||
{ | ||
title: "Bencoolen MRT", | ||
direction: [ | ||
{ | ||
method: "Exit via Exit C", | ||
img: "/events/june/directions/Bencoolen_Exit C(Coming Out).webp" | ||
}, | ||
{ | ||
method: "Turn left and walk along this walkway", | ||
img: "/events/june/directions/Bencoolen_Exit C.webp" | ||
}, | ||
{ | ||
method: "Continue along this walkway", | ||
img: "/events/june/directions/Walkway From Bras Basah Exit C _ Bencoolen Exit C.webp" | ||
}, | ||
{ | ||
method: "Turn right and go up the escalator", | ||
img: "/events/june/directions/End of Walkway 1.webp" | ||
}, | ||
{ | ||
method: "Walk along this walkway", | ||
img: "/events/june/directions/Start of Walkway 2.webp" | ||
}, | ||
{ | ||
method: "Continue along this walkway", | ||
img: "/events/june/directions/Walkway 2 Continued.webp" | ||
}, | ||
{ | ||
method: "Turn right at the dead end and exit", | ||
img: "/events/june/directions/End of walkway 2_ Before Escalator to NAKA.webp" | ||
}, | ||
{ | ||
method: "Go up the escalator and turn right", | ||
img: "/events/june/directions/Escalator to NAKA.webp" | ||
}, | ||
{ | ||
method: "Enter and go to Level 2", | ||
img: "/events/june/directions/SOA_Security.webp" | ||
} | ||
] | ||
}, | ||
{ | ||
title: "Bras Basah MRT", | ||
direction: [ | ||
{ | ||
method: "Exit via Exit B and turn right", | ||
img: "/events/june/directions/Bras Basah_Exit B.webp" | ||
}, | ||
{ | ||
method: "Turn left and go up the escalator", | ||
img: "/events/june/directions/End of Walkway 1.webp" | ||
}, | ||
{ | ||
method: "Walk along this walkway", | ||
img: "/events/june/directions/Start of Walkway 2.webp" | ||
}, | ||
{ | ||
method: "Continue along this walkway", | ||
img: "/events/june/directions/Walkway 2 Continued.webp" | ||
}, | ||
{ | ||
method: "Turn right at the dead end and exit", | ||
img: "/events/june/directions/End of walkway 2_ Before Escalator to NAKA.webp" | ||
}, | ||
{ | ||
method: "Go up the escalator and turn right", | ||
img: "/events/june/directions/Escalator to NAKA.webp" | ||
}, | ||
{ | ||
method: "Enter and go to Level 2", | ||
img: "/events/june/directions/SOA_Security.webp" | ||
} | ||
] | ||
}, | ||
{ | ||
title: "Bus", | ||
direction: [ | ||
{ | ||
method: "Take a bus to the SMU (4) bus stop (04121)", | ||
img: "/events/june/directions/04121 Busstop.webp" | ||
}, | ||
{ | ||
method: "Go straight and turn left", | ||
img: "/events/june/directions/To NAKA from Bus Stop_ Lib pick up.webp" | ||
}, | ||
{ | ||
method: "Enter and go to Level 2", | ||
img: "/events/june/directions/SOA_Security.webp" | ||
} | ||
] | ||
}, | ||
{ | ||
title: "Drop-off by Car", | ||
direction: [ | ||
{ | ||
method: "Drop off here at Li Ka Shing Library", | ||
img: "/events/june/directions/Library_Pick Up.webp" | ||
}, | ||
{ | ||
method: "Walk straight along the walkway", | ||
img: "/events/june/directions/Library pickup to NAKA_1.webp" | ||
}, | ||
{ | ||
method: "Turn left and go to the crossing and cross the road", | ||
img: "/events/june/directions/Library pickup to NAKA_2.webp" | ||
}, | ||
{ | ||
method: "After crossing, enter from from the bus stop and turn left", | ||
img: "/events/june/directions/To NAKA from Bus Stop_ Lib pick up.webp" | ||
}, | ||
{ | ||
method: "Enter and go to Level 2", | ||
img: "/events/june/directions/SOA_Security.webp" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
const days = directions.map(day => <TabsTrigger className="w-full" value={day.title}>{day.title}</TabsTrigger>); | ||
const methods = directions.map(methods => ( | ||
<TabsContent value={methods.title}> | ||
<Tabs> | ||
<TabsList className="flex-wrap gap-y-1 w-full"> | ||
{methods.methods.map(method => <TabsTrigger className="flex-1" value={method.title}>{method.title}</TabsTrigger>)} | ||
</TabsList> | ||
{methods.methods.map((method) => <TabsContent value={method.title}> | ||
{method.direction?.map((direction, index) => ( | ||
<div> | ||
<img src={direction.img} alt="" className="rounded-xl ring ring-1 ring-slate-800 mt-6" /> | ||
<div className="flex gap-x-2 mt-3 justify-center items-center"> | ||
<h2 className="text-base">{index + 1}.</h2> | ||
<p>{direction.method}</p> | ||
</div> | ||
</div> | ||
))} | ||
<div className="bg-slate-900 mt-7 mb-10 p-5 rounded-xl flex flex-col items-center"> | ||
<h2 className="text-lg mb-4">You've reached!</h2> | ||
<Button | ||
onClick={() => | ||
confetti({ | ||
angle: randomInRange(55, 125), | ||
spread: randomInRange(50, 70), | ||
particleCount: randomInRange(50, 100), | ||
origin: { y: 0.6 }, | ||
}) | ||
} | ||
className="inline-flex items-center justify-center" | ||
> | ||
click me :) | ||
</Button> | ||
</div> | ||
</TabsContent>)} | ||
</Tabs> | ||
</TabsContent> | ||
)); | ||
return ( | ||
<Tabs className="my-5"> | ||
<TabsList className="w-full"> | ||
{days} | ||
</TabsList> | ||
{methods} | ||
</Tabs> | ||
) | ||
}; | ||
|
||
function randomInRange(min: number, max: number) { | ||
return Math.random() * (max - min) + min; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
import Layout from "../../../layout.astro"; | ||
import DirectionList from "../../../components/eventpage/directions"; | ||
--- | ||
<Layout title="Directions to June Conference" showTitle desc=""> | ||
<main class="max-w-2xl mx-auto px-4"> | ||
<p class="text-center">Select the day and the method of arrival to see directions</p> | ||
<DirectionList client:load /> | ||
</main> | ||
</Layout> |