From 2bbcd95635986dc4dababf7c9f0705a790047816 Mon Sep 17 00:00:00 2001 From: CodeDotJS Date: Mon, 5 Oct 2026 00:33:25 +0530 Subject: [PATCH 1/3] fix(ui): slide the empty ride track with css --- src/index.css | 11 +++++++++++ src/ui/MetroScene.tsx | 12 +----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/index.css b/src/index.css index 10d6577..30e6213 100644 --- a/src/index.css +++ b/src/index.css @@ -163,17 +163,28 @@ summary:active { aspect-ratio: 720 / 220; } +.metro-track { + transform-box: fill-box; + transform-origin: left center; + animation: metro-track-slide 8s linear infinite; +} + .metro-wheel { transform-box: fill-box; transform-origin: center; animation: metro-wheel-spin 0.7s linear infinite; } +@keyframes metro-track-slide { + to { transform: translate(-50%, 0); } +} + @keyframes metro-wheel-spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { + .metro-track, .metro-wheel { animation: none; } button, .tabbar a, diff --git a/src/ui/MetroScene.tsx b/src/ui/MetroScene.tsx index 70d6478..dfccc75 100644 --- a/src/ui/MetroScene.tsx +++ b/src/ui/MetroScene.tsx @@ -15,17 +15,7 @@ export function MetroScene() { ))} - - {run ? ( - - ) : null} + From 9a7779d0663d6e0d1ed05135f338348d84adedaf Mon Sep 17 00:00:00 2001 From: CodeDotJS Date: Mon, 5 Oct 2026 00:33:30 +0530 Subject: [PATCH 2/3] fix(ui): start text size at the minimum --- src/App.tsx | 6 ++++-- src/index.css | 2 +- src/lib/plan/textSize.ts | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 1c96985..0d2f597 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,7 +10,7 @@ import { savedJourneys } from "./lib/offline/saved" import { alternateRide, planRoute, sameRide } from "./lib/transit/route" import { startLineCode } from "./lib/transit/routeMap" import { readSelection, writeSelection } from "./lib/plan/selection" -import { readTextSize, textDefault } from "./lib/plan/textSize" +import { readTextSize, textDefault, textStorageKey } from "./lib/plan/textSize" import { createPlanState, planReducer, routeBlockReason } from "./lib/plan/state" import { clearTrips, readTripQuery, readTrips, removeTrip, saveTrip, tripQuery, type SavedTrip } from "./lib/plan/trips" import type { Journey, Lang, Suggestion } from "./lib/transit/types" @@ -133,7 +133,8 @@ export function App() { document.documentElement.style.fontSize = `${textSize}px` try { localStorage.removeItem("dms-lang") - localStorage.setItem("dms-text", String(textSize)) + localStorage.removeItem("dms-text") + localStorage.setItem(textStorageKey, String(textSize)) } catch { // The planner still works when storage is blocked. } @@ -386,6 +387,7 @@ export function App() { function clearSavedData() { try { localStorage.removeItem("dms-text") + localStorage.removeItem(textStorageKey) clearTrips(localStorage) } catch { // The controls still reset on screen. diff --git a/src/index.css b/src/index.css index 30e6213..707ab9c 100644 --- a/src/index.css +++ b/src/index.css @@ -13,7 +13,7 @@ --display: "IBM Plex Sans", sans-serif; --text: "IBM Plex Sans", sans-serif; font-family: var(--text); - font-size: 14px; + font-size: 12px; line-height: 1.45; color: var(--ink); background: var(--page); diff --git a/src/lib/plan/textSize.ts b/src/lib/plan/textSize.ts index 8f63e87..1e38e37 100644 --- a/src/lib/plan/textSize.ts +++ b/src/lib/plan/textSize.ts @@ -1,15 +1,15 @@ export const textMin = 12 export const textMax = 22 -export const textDefault = 13 +export const textDefault = textMin +export const textStorageKey = "dms-text-size" export function readTextSize(): number { try { - const saved = localStorage.getItem("dms-text") - if (saved === "small") return 13 - if (saved === "normal") return 16 - if (saved === "large") return 19 + const saved = localStorage.getItem(textStorageKey) const value = Number(saved) - if (Number.isFinite(value)) return Math.min(textMax, Math.max(textMin, Math.round(value))) + if (saved !== null && saved !== "" && Number.isFinite(value)) { + return Math.min(textMax, Math.max(textMin, Math.round(value))) + } } catch { // Storage can be blocked. The default still applies. } From 7bcfe15e3637d0419392a94751a3e7eafb6e91cc Mon Sep 17 00:00:00 2001 From: CodeDotJS Date: Mon, 5 Oct 2026 00:33:30 +0530 Subject: [PATCH 3/3] feat(seo): use a wide wave as the share image --- README.md | 4 ++-- index.html | 8 ++++---- public/share/cover.jpg | Bin 284467 -> 75869 bytes 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 463c366..2a88a4c 100644 --- a/README.md +++ b/README.md @@ -93,14 +93,14 @@ The product scope is [`docs/PRODUCT.md`](docs/PRODUCT.md). The upstream API reco ## Credits

- Ink drawing of a train at a station, by Péchane + The Great Wave off Kanagawa, a woodblock print by Katsushika Hokusai

The landmark drawings are from [SVG Repo](https://www.svgrepo.com/). Lines, stations, fares, platforms, and first and last trains come from the public site of the [Delhi Metro Rail Corporation](https://delhimetrorail.com/). DETRO is not an official DMRC app. -The cover image is a work by [Péchane](https://www.artmajeur.com/pechane). +The cover image is [The Great Wave off Kanagawa](https://en.wikipedia.org/wiki/The_Great_Wave_off_Kanagawa) by Katsushika Hokusai. --- diff --git a/index.html b/index.html index e850d81..f03ec6d 100644 --- a/index.html +++ b/index.html @@ -25,9 +25,9 @@ - - - + + + - +