-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from OneBusAway/feature/trip-planner
DRAFT: Trip Planner
- Loading branch information
Showing
20 changed files
with
965 additions
and
71 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
PRIVATE_OBA_API_KEY="test" | ||
|
||
PRIVATE_OBA_GEOCODER_API_KEY="" | ||
PRIVATE_OBA_GEOCODER_PROVIDER="google" | ||
|
||
PRIVATE_OBACO_API_BASE_URL=https://onebusaway.co/api/v1/regions/:REGION_ID | ||
PRIVATE_OBACO_SHOW_TEST_ALERTS=false | ||
|
||
PUBLIC_NAV_BAR_LINKS={"Home": "/","About": "/about","Contact": "/contact","Fares & Tolls": "/fares-and-tolls"} | ||
PUBLIC_OBA_GOOGLE_MAPS_API_KEY="" | ||
PUBLIC_OBA_LOGO_URL="https://onebusaway.org/wp-content/uploads/oba_logo-1.png" | ||
PUBLIC_OBA_MAP_PROVIDER="osm" | ||
|
||
PUBLIC_OBA_REGION_CENTER_LAT=47.60728155903877 | ||
PUBLIC_OBA_REGION_CENTER_LNG=-122.3339240843084 | ||
PUBLIC_OBA_REGION_NAME="Puget Sound" | ||
|
||
PUBLIC_OBA_SERVER_URL="https://api.pugetsound.onebusaway.org/" | ||
|
||
PUBLIC_OTP_SERVER_URL="" |
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,27 @@ | ||
<script> | ||
import LegDetails from './LegDetails.svelte'; | ||
import { formatTime } from '$lib/formatters'; | ||
export let itinerary; | ||
export let expandedSteps; | ||
export let toggleSteps; | ||
</script> | ||
|
||
<div class="mb-4 flex items-center justify-between rounded-lg bg-gray-100 p-4 shadow-md"> | ||
<div class="text-center"> | ||
<p class="text-sm font-semibold text-gray-500">Duration</p> | ||
<p class="text-lg font-bold text-gray-700">{Math.round(itinerary.duration / 60)} min</p> | ||
</div> | ||
<div class="text-center"> | ||
<p class="text-sm font-semibold text-gray-500">Start Time</p> | ||
<p class="text-lg font-bold text-gray-700">{formatTime(itinerary.startTime)}</p> | ||
</div> | ||
<div class="text-center"> | ||
<p class="text-sm font-semibold text-gray-500">End Time</p> | ||
<p class="text-lg font-bold text-gray-700">{formatTime(itinerary.endTime)}</p> | ||
</div> | ||
</div> | ||
<div class="space-y-4"> | ||
{#each itinerary.legs as leg, index} | ||
<LegDetails {leg} {index} {expandedSteps} {toggleSteps} /> | ||
{/each} | ||
</div> |
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,14 @@ | ||
<script> | ||
export let index; | ||
export let activeTab; | ||
export let setActiveTab; | ||
</script> | ||
|
||
<button | ||
class={`-mb-px px-4 py-2 font-semibold ${ | ||
activeTab === index ? 'border-b-2 border-green-500 text-green-500' : 'text-gray-500' | ||
}`} | ||
on:click={() => setActiveTab(index)} | ||
> | ||
Itinerary {index + 1} | ||
</button> |
Oops, something went wrong.