diff --git a/src/app.css b/src/app.css index db19a19..4d107db 100644 --- a/src/app.css +++ b/src/app.css @@ -2,10 +2,24 @@ @tailwind components; @tailwind utilities; -.scroll-hidden { - -ms-overflow-style: none; /* Internet Explorer 10+ */ - scrollbar-width: none; /* Firefox */ -} -.scroll-hidden::-webkit-scrollbar { - display: none; /* Safari and Chrome */ +@layer components { + .scroll-hidden { + -ms-overflow-style: none; /* Internet Explorer 10+ */ + scrollbar-width: none; /* Firefox */ + } + .scroll-hidden::-webkit-scrollbar { + display: none; /* Safari and Chrome */ + } + + .h1 { + @apply mb-4 text-2xl font-semibold text-[#86858B] dark:text-gray-300; + } + + .h2 { + @apply mb-4 text-xl font-semibold text-[#86858B] dark:text-gray-300; + } + + .h3 { + @apply mb-2 text-lg font-semibold dark:text-white; + } } diff --git a/src/components/ArrivalDeparture.svelte b/src/components/ArrivalDeparture.svelte index e5b0cc4..c4a32ca 100644 --- a/src/components/ArrivalDeparture.svelte +++ b/src/components/ArrivalDeparture.svelte @@ -23,7 +23,9 @@ const predictedDiff = predicted - now; const scheduledDiff = scheduled - now; - if (predictedDiff <= 0) { + if (predictedTime == 0) { + return { status: 'scheduled', text: 'Scheduled/not real-time', color: 'text-gray-500' }; + } else if (predictedDiff <= 0) { return { status: 'early', text: 'arrives ' + Math.abs(Math.floor(predictedDiff / 60000)) + ' min early', @@ -71,10 +73,10 @@ class="flex h-auto w-full items-center justify-between border-b-[1px] border-[#C6C6C8] bg-[#ffffff] p-4 hover:cursor-pointer hover:bg-[#e3e3e3] dark:border-[#313135] dark:bg-[#1c1c1c] hover:dark:bg-[#363636]" >
+
{routeShortName} - {tripHeadsign}
-+
{formatTime(scheduledArrivalTime)} -
{getArrivalStatus(predictedArrivalTime, scheduledArrivalTime).text}
diff --git a/src/components/map/RouteMap.svelte b/src/components/map/RouteMap.svelte
index a031510..e3997ac 100644
--- a/src/components/map/RouteMap.svelte
+++ b/src/components/map/RouteMap.svelte
@@ -74,7 +74,7 @@
infoWindow = new google.maps.InfoWindow({
content: ` Arrival time: ${new Date(stopTime.arrivalTime * 1000).toLocaleTimeString()}${stop.name}
+ ${stop.name}
{stop.name}
- Stop #{stop.id}
+ {stop.name}
+ Stop #{stop.id}
{#if routeShortNames()}
- Routes: {routeShortNames().join(', ')}
+ Routes: {routeShortNames().join(', ')}
{/if}
- Arrivals and Departures
-
+ Arrivals and Departures