-
Notifications
You must be signed in to change notification settings - Fork 2
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 #134 from OneBusAway/stops-schedules-fnf
Standalone Stop Pages Fit and Finish
- Loading branch information
Showing
21 changed files
with
216 additions
and
144 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
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,3 @@ | ||
<div class="mx-auto h-full max-w-5xl overflow-y-auto pt-4"> | ||
<slot></slot> | ||
</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,41 @@ | ||
<!-- | ||
This Svelte component renders a FontAwesome arrow icon that rotates based on the provided `stopDirection` prop. | ||
Props: | ||
- `stopDirection` (string): The direction in which the arrow should point. | ||
Possible values are 'N', 'NE', 'E', 'SE', 'S', 'SW', 'W', 'NW'. | ||
If the value is not one of these, the arrow will be hidden. | ||
--> | ||
|
||
<script> | ||
import { faArrowRight } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/svelte-fontawesome'; | ||
export let stopDirection = ''; | ||
function rotationAngleClass() { | ||
switch (stopDirection) { | ||
case 'N': | ||
return '-rotate-90'; | ||
case 'NE': | ||
return '-rotate-45'; | ||
case 'E': | ||
return 'rotate-0'; | ||
case 'SE': | ||
return 'rotate-45'; | ||
case 'S': | ||
return 'rotate-90'; | ||
case 'SW': | ||
return 'rotate-135'; | ||
case 'W': | ||
return 'rotate-180'; | ||
case 'NW': | ||
return 'rotate-225'; | ||
default: | ||
return 'hidden'; | ||
} | ||
} | ||
</script> | ||
|
||
<FontAwesomeIcon icon={faArrowRight} class={rotationAngleClass()} /> |
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
<script> | ||
import { faMapMarkerAlt } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/svelte-fontawesome'; | ||
import CompassArrow from '$components/controls/CompassArrow.svelte'; | ||
import TabContainer from '$components/tabs/TabContainer.svelte'; | ||
import TabLink from '$components/tabs/TabLink.svelte'; | ||
import { page } from '$app/stores'; | ||
import { t } from 'svelte-i18n'; | ||
export let stopName; | ||
export let stopId; | ||
export let stopDirection; | ||
</script> | ||
|
||
<div class="mb-8 text-center"> | ||
<h1 class="flex items-center justify-center gap-2 text-3xl font-bold text-green-700"> | ||
{stopName} | ||
</h1> | ||
<div class="text-normal mt-2 flex items-center justify-center gap-x-8 text-gray-700"> | ||
<div class="rounded-md bg-gray-50 px-2 py-1"> | ||
<FontAwesomeIcon icon={faMapMarkerAlt} /> | ||
<strong>{$t('schedule_for_stop.stop_id')}:</strong> | ||
{stopId} | ||
</div> | ||
<div class="rounded-md bg-gray-50 px-2 py-1"> | ||
<CompassArrow {stopDirection} /> | ||
<strong>{$t('schedule_for_stop.direction')}:</strong> | ||
{stopDirection} | ||
</div> | ||
</div> | ||
<TabContainer> | ||
<TabLink href="/stops/{stopId}" current={$page.route.id === '/stops/[stopID]'} | ||
>{$t('arrivals_and_departures_for_stop.title')}</TabLink | ||
> | ||
<TabLink href="/stops/{stopId}/schedule" current={$page.route.id === '/stops/[stopID]/schedule'} | ||
>{$t('schedule_for_stop.route_schedules')}</TabLink | ||
> | ||
</TabContainer> | ||
</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,3 @@ | ||
<div class="tab-container"> | ||
<slot></slot> | ||
</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,10 @@ | ||
<script> | ||
export let current = false; | ||
export let href; | ||
</script> | ||
|
||
<div class="tab-container__item" class:tab-container__item--active={current}> | ||
<a {href} class="block"> | ||
<slot></slot> | ||
</a> | ||
</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
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
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
Oops, something went wrong.