3 Commits
3 changed files with 10 additions and 4 deletions
+7 -1
View File
@@ -6,6 +6,12 @@ A lightweight bus transport web app that uses the gateway OpenAPI contract at:
The frontend is built with SvelteKit. It dynamically loads transport endpoints from the OpenAPI spec and calls them through a SvelteKit server hook proxy.
## Live demo
Access the app at https://bus.furyhawk.lol/ or scan the QR code below:
[![QR code to bus.furyhawk.lol](docs/screenshots/bus-qr-code.png)](https://bus.furyhawk.lol/)
## Screenshot
![Nearby Bus Arrivals UI](docs/screenshots/bus-ui-v2.png)
@@ -18,7 +24,7 @@ The frontend is built with SvelteKit. It dynamically loads transport endpoints f
## Run
1. Ensure your API gateway is running at http://localhost:8067.
1. Ensure your API gateway is running at http://localhost:8067. Refer to https://github.com/furyhawk/lta_datamall_api.git
2. Install dependencies:
```bash
Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

+3 -3
View File
@@ -430,7 +430,7 @@
async function selectBusStop(stop, loadArrivals = false) {
selectedStop = stop;
locationMessage = `Selected stop: ${stop.description} (${stop.code})`;
locationMessage = `Selected stop: <strong>${escapeHtml(stop.description)}</strong> (${stop.code})`;
await updateMap();
if (loadArrivals) {
await runArrival();
@@ -444,7 +444,7 @@
throw new Error("No nearby bus stop found.");
}
locationMessage = `Nearest stop found: ${selectedStop.description} (${selectedStop.code}). Tap another stop in the list or map.`;
locationMessage = `Nearest stop found: <strong>${escapeHtml(selectedStop.description)}</strong> (${selectedStop.code}). Tap another stop in the list or map.`;
await updateMap();
setStatus("Location Ready", "ok");
@@ -543,7 +543,7 @@
{/if}
<span class="visually-hidden">{locating ? "Locating..." : "Use Current Location"}</span>
</button>
<p class="hint">{locationMessage}</p>
<p class="hint">{@html locationMessage}</p>
</div>
</div>
</div>