diff --git a/src/app/(public)/blogs/meta.ts b/src/app/(public)/blogs/meta.ts index bd2b9cc..6ddd73a 100644 --- a/src/app/(public)/blogs/meta.ts +++ b/src/app/(public)/blogs/meta.ts @@ -16,8 +16,7 @@ export const meta: { slug: string; title: string; description: string; postedDat { slug: "walking-on-singapore-mrt-lines", title: "Walking on Singapore MRT Lines", - description: - "I am on a project of walking on all Singapore MRT lines. This page shows the progress and the routes I have walked.", - postedDate: "2024-01-28", + description: "I walked on all Singapore MRT lines. Yes!!!", + postedDate: "2024-04-02", }, ]; diff --git a/src/app/blogs/walking-on-singapore-mrt-lines/opengraph-image.alt.txt b/src/app/blogs/walking-on-singapore-mrt-lines/opengraph-image.alt.txt new file mode 100644 index 0000000..b73f2ef --- /dev/null +++ b/src/app/blogs/walking-on-singapore-mrt-lines/opengraph-image.alt.txt @@ -0,0 +1 @@ +Walking on Singapore MRT Lines diff --git a/src/app/blogs/walking-on-singapore-mrt-lines/opengraph-image.png b/src/app/blogs/walking-on-singapore-mrt-lines/opengraph-image.png new file mode 100644 index 0000000..740f3a6 Binary files /dev/null and b/src/app/blogs/walking-on-singapore-mrt-lines/opengraph-image.png differ diff --git a/src/app/blogs/walking-on-singapore-mrt-lines/page.tsx b/src/app/blogs/walking-on-singapore-mrt-lines/page.tsx index b2cb89a..a2a87e9 100644 --- a/src/app/blogs/walking-on-singapore-mrt-lines/page.tsx +++ b/src/app/blogs/walking-on-singapore-mrt-lines/page.tsx @@ -26,6 +26,6 @@ export default function Page() { ); } -export const metadata: Metadata = makeMetadata("walking-on-singapore-mrt-lines"); +export const metadata: Metadata = makeMetadata("walking-on-singapore-mrt-lines", true); export const revalidate = 0; export const runtime = "edge"; diff --git a/src/app/blogs/walking-on-singapore-mrt-lines/panel.tsx b/src/app/blogs/walking-on-singapore-mrt-lines/panel.tsx index 518ea24..892930d 100644 --- a/src/app/blogs/walking-on-singapore-mrt-lines/panel.tsx +++ b/src/app/blogs/walking-on-singapore-mrt-lines/panel.tsx @@ -14,14 +14,20 @@ import { useActiveSession } from "./context"; import data from "./data.json"; import type { Line, Session } from "./types"; +import Image from "next/image"; +import systemMap from "./system-map.png"; + +const allSessions: Session[] = data.flatMap(x => x.sessions as Session[]); +const stats = getStats(allSessions); + function convertMinToMinSec(min: number) { const minInt = Math.floor(min); const sec = Math.round((min - minInt) * 60); return Number.isNaN(minInt) ? "N/A" : `${minInt}:${sec < 10 ? "0" : ""}${sec}`; } -function getLineStats(line: Line) { - const stats = line.sessions.reduce( +function getStats(sessions: Session[]) { + const stats = sessions.reduce( (acc, workout) => ({ distance: acc.distance + workout.distance, kcal: acc.kcal + workout.kcal, @@ -189,9 +195,15 @@ const StationBadge = memo(function StationBadge({ station }: { station: string } function Overview() { return ( - -
+ +

Walking on Singapore MRT Lines

+
+ + + + +

After some years living in Singapore, I basically went to all places that captured my interests already, be it attractions, parks, beaches, malls or lakes. @@ -208,16 +220,73 @@ function Overview() { a good way for some exercising.

- It’s not gonna be easy to finish this. But I already got Circle Line done. And I’ll try - others soon. Hopefully I can finish all lines before I leave Singapore. + And after 40 sessions spread over a bit more than 2 months, from 28 January to 1 April + 2024, I have finally conquered all opened sections of the MRT/LRT system of Singapore. + Every single line, every line termini, and a whole lot of stations. Of course, a lot of + money was spent on fares too, I think I spent at least a hundred dollar on this whole + project. I should have bought a concession card before I started, but silly me forgot + concession cards existed until much later. +

+

+ Throughout the project, my performance actually increased as well. Initially I, just like + any terminally online university student, wasn’t able to do much, and I only had some 5km + sessions at around 5km/h. A 7km sounded like a crazy amount to me back then. Well, some + 280km later, now 8km sessions are the norm and I can even consistently do them at around + 5.5–6km/h. Practice makes perfect, I guess. +

+

System map

+

+ Presenting: The MRT system map of Singapore, with only stations that are termini of my + walking sessions. You can also download a{" "} + + higher quality version (1.17MB) + + . +

+
+ System map with only stations that are termini of my walking sessions +
+

The future

+

+ I think I will continue doing this for sections that are still under construction. It will + be hard though and for many places, it’s just impossible. For example the Tengah region is + just a giant construction zone at the moment I heard – so I cannot do a lot of the JRL + sections there. So, I dunno… perhaps the new sessions will be a lot more disjointed + and messy than this nice little map we currently have of opened sections.

+

If you want to do the same

+

Please do! It will be very satisfying and energising.

+

Just note a few things:

+
    +
  • + My tracks here are not necessarily the best track. Do use{" "} + OneMap,{" "} + OpenStreetMap{" "} + and your device’s map app to plan the track carefully in advance. Especially + OpenStreetMap, it’s really helpful and I wish I had known about it when I started – I + would be able to optimise a lot more for my tracks. +
  • +
  • + Most of the tracks here are friendly to cyclists, but not all. Some parts do involve + stairs, so if you cycle instead of walk, you may have to take alternative routes or + diversions in certain places. +
  • +
  • + Be absolutely careful around expressways. You could face a long detour. @Government + Please add pedestrian sidewalks on the sides of expressways, or at least more pedestrian + bridges 🙏 +
  • +
); } function LineOverview({ line }: { line: Line }) { - const stats = useMemo(() => getLineStats(line), [line]); + const stats = useMemo(() => getStats(line.sessions), [line.sessions]); return (
diff --git a/src/app/blogs/walking-on-singapore-mrt-lines/system-map.png b/src/app/blogs/walking-on-singapore-mrt-lines/system-map.png new file mode 100644 index 0000000..714226d Binary files /dev/null and b/src/app/blogs/walking-on-singapore-mrt-lines/system-map.png differ diff --git a/src/lib/blogs/utils.ts b/src/lib/blogs/utils.ts index 44c07ca..d428f52 100644 --- a/src/lib/blogs/utils.ts +++ b/src/lib/blogs/utils.ts @@ -8,7 +8,7 @@ export function formatTime(date: Date) { return date.toLocaleDateString("en-GB", { day: "numeric", month: "long", year: "numeric" }); } -export function makeMetadata(slug: string): Metadata { +export function makeMetadata(slug: string, overrideOg = false): Metadata { const metadata = meta.find(m => m.slug === slug); if (!metadata) throw new Error(`No metadata found for slug: ${slug}`); @@ -25,7 +25,7 @@ export function makeMetadata(slug: string): Metadata { description, type: "article", url: `/blogs/${slug}`, - ...opengraphImage, + ...(overrideOg ? {} : opengraphImage), }, twitter: { card: "summary_large_image",