diff --git a/src/components/StandalonePage.svelte b/src/components/StandalonePage.svelte index 2cd0932..fb7d174 100644 --- a/src/components/StandalonePage.svelte +++ b/src/components/StandalonePage.svelte @@ -1,3 +1,3 @@ -
+
diff --git a/src/components/containers/Accordion.svelte b/src/components/containers/Accordion.svelte new file mode 100644 index 0000000..2bebc25 --- /dev/null +++ b/src/components/containers/Accordion.svelte @@ -0,0 +1,74 @@ + + +
+ +
diff --git a/src/components/containers/AccordionItem.svelte b/src/components/containers/AccordionItem.svelte new file mode 100644 index 0000000..34c2f42 --- /dev/null +++ b/src/components/containers/AccordionItem.svelte @@ -0,0 +1,47 @@ + + +
+
+ +
+ + {#if $isActive} +
+
+ +
+
+ {/if} +
diff --git a/src/components/schedule-for-stop/RouteScheduleTable.svelte b/src/components/schedule-for-stop/RouteScheduleTable.svelte new file mode 100644 index 0000000..1f54fbe --- /dev/null +++ b/src/components/schedule-for-stop/RouteScheduleTable.svelte @@ -0,0 +1,100 @@ + + +
+ + + + + + + + + + + + {#if renderScheduleTable(schedule).amTimes.length === 0} + + + + {:else} + {#each renderScheduleTable(schedule).amTimes as [hour, times]} + + + + + {/each} + {/if} + + + + + {#if renderScheduleTable(schedule).pmTimes.length === 0} + + + + {:else} + {#each renderScheduleTable(schedule).pmTimes as [hour, times]} + + + + + {/each} + {/if} + +
{$t('schedule_for_stop.hour')}{$t('schedule_for_stop.minutes')}
AM
+ {$t('schedule_for_stop.no_am_schedules_available')} +
+ {formatHour(hour)} AM + + {#each times as stopTime, index (index)} + + {extractMinutes(stopTime.arrivalTime)} + {index < times.length - 1 ? ', ' : ''} + + {/each} +
PM
+ {$t('schedule_for_stop.no_pm_schedules_available')} +
+ {formatHour(hour)} PM + + {#each times as stopTime, index (index)} + + {extractMinutes(stopTime.arrivalTime)} + {index < times.length - 1 ? ', ' : ''} + + {/each} +
+
diff --git a/src/components/schedule-for-stop/ScheduleAccordionItem.svelte b/src/components/schedule-for-stop/ScheduleAccordionItem.svelte deleted file mode 100644 index d5c50cd..0000000 --- a/src/components/schedule-for-stop/ScheduleAccordionItem.svelte +++ /dev/null @@ -1,114 +0,0 @@ - - - - - {schedule.tripHeadsign} - -
- - - - - - - - - - - - {#if renderScheduleTable(schedule).amTimes.length === 0} - - - - {:else} - {#each renderScheduleTable(schedule).amTimes as [hour, times]} - - - - - {/each} - {/if} - - - - - {#if renderScheduleTable(schedule).pmTimes.length === 0} - - - - {:else} - {#each renderScheduleTable(schedule).pmTimes as [hour, times]} - - - - - {/each} - {/if} - -
{$t('schedule_for_stop.hour')}{$t('schedule_for_stop.minutes')}
AM
- {$t('schedule_for_stop.no_am_schedules_available')} -
- {formatHour(hour)} AM - - {#each times as stopTime, index (index)} - - {extractMinutes(stopTime.arrivalTime)} - {index < times.length - 1 ? ', ' : ''} - - {/each} -
PM
- {$t('schedule_for_stop.no_pm_schedules_available')} -
- {formatHour(hour)} PM - - {#each times as stopTime, index (index)} - - {extractMinutes(stopTime.arrivalTime)} - {index < times.length - 1 ? ', ' : ''} - - {/each} -
-
-
diff --git a/src/components/stops/StopPageHeader.svelte b/src/components/stops/StopPageHeader.svelte index 2c4a4c1..265ff7d 100644 --- a/src/components/stops/StopPageHeader.svelte +++ b/src/components/stops/StopPageHeader.svelte @@ -12,7 +12,7 @@ export let stopDirection; -
+

{stopName}

diff --git a/src/routes/stops/[stopID]/schedule/+page.svelte b/src/routes/stops/[stopID]/schedule/+page.svelte index 71243cc..a116741 100644 --- a/src/routes/stops/[stopID]/schedule/+page.svelte +++ b/src/routes/stops/[stopID]/schedule/+page.svelte @@ -1,11 +1,12 @@ @@ -150,10 +141,10 @@
- -
@@ -165,13 +156,12 @@ {$t('schedule_for_stop.no_schedules_available')}

{:else} - - {#each schedules as schedule, index (schedule.tripHeadsign)} - toggleAccordion(index)} - /> + + {#each schedules as schedule} + + {schedule.tripHeadsign} + + {/each} {/if}