Skip to content

Commit e79e31d

Browse files
committed
frontend: align filter at the bottom, fix cutting of on mobile browsers
1 parent 40289b1 commit e79e31d

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

frontend/src/components/timetable/Filter.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
</script>
9999

100100
<div
101-
class="scrollbar-hidden container mx-auto flex items-center overflow-x-auto bg-primary-darker py-2 md:justify-center md:gap-x-4"
101+
class="scrollbar-hidden flex items-center overflow-x-auto bg-primary-darker py-2 md:justify-center md:gap-x-4"
102102
>
103103
{#each filteredTypes as type}
104104
<button

frontend/src/routes/[evaNumber]/[type=type]/+page.svelte

+17-14
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,29 @@
4646
}}
4747
/>
4848

49-
<div class="flex flex-col items-center">
5049
<div class="container mx-auto flex items-center justify-between px-4">
5150
<span class="text-xl font-semibold md:px-4 md:text-4xl">{data.station.name}</span>
5251
<Clock />
5352
</div>
53+
<div class="flex flex-col items-center pb-safe">
5454

55-
<Filter allowedProducts={data.station.products ? Object.values(data.station.products) : []} bind:selected={currentFilter} />
55+
<div class="scrollbar-hidden container mx-auto overflow-y-hidden">
56+
{#each data.journeys as journey}
57+
{#if !matchesFilter(journey)}{:else}
58+
<p>
59+
{journey?.connections[0]?.lineInformation?.lineName}
60+
@ {journey?.connections[0]?.departure?.plannedTime
61+
? DateTime.fromISO(journey?.connections[0]?.departure.plannedTime).toFormat("HH:mm")
62+
: "N/A"}
63+
</p>
64+
{/if}
65+
{/each}
66+
</div>
5667

57-
<div class="scrollbar-hidden container mx-auto overflow-y-hidden">
58-
{#each data.journeys as journey}
59-
{#if !matchesFilter(journey)}{:else}
60-
<p>
61-
{journey?.connections[0]?.lineInformation?.lineName}
62-
@ {journey?.connections[0]?.departure?.plannedTime
63-
? DateTime.fromISO(journey?.connections[0]?.departure.plannedTime).toFormat("HH:mm")
64-
: "N/A"}
65-
</p>
66-
{/if}
67-
{/each}
68-
</div>
68+
<div class="fixed bottom-0 left-0 right-0 z-50">
69+
<Filter allowedProducts={data.station.products ? Object.values(data.station.products) : []}
70+
bind:selected={currentFilter}/>
71+
</div>
6972
</div>
7073

7174
<style>

0 commit comments

Comments
 (0)