|
7 | 7 | import ViaStops from "$components/timetable/info/ViaStops.svelte";
|
8 | 8 | import Messages from "$components/timetable/messages/Messages.svelte";
|
9 | 9 |
|
10 |
| - let { connection }: { connection: Connection } = $props(); |
| 10 | + let { connection, renderBorder, renderInformation }: { |
| 11 | + connection: Connection, |
| 12 | + renderBorder: boolean, |
| 13 | + renderInformation: boolean |
| 14 | + } = $props(); |
11 | 15 | const isDeparture = getContext<boolean>("isDeparture");
|
12 | 16 | </script>
|
13 | 17 |
|
14 | 18 | <div class:bg-text={connection?.cancelled ?? false}
|
15 | 19 | class:text-background={connection?.cancelled ?? false}
|
16 |
| - class="font-medium py-2" |
| 20 | + class="font-medium py-1" |
17 | 21 | >
|
18 | 22 | <!-- layout for smaller screens (under md) -->
|
19 | 23 | <div class="p-2 md:hidden gap-y-2">
|
|
49 | 53 | <div class="mx-auto hidden md:flex flex-col justify-between">
|
50 | 54 | <!-- 1st row -->
|
51 | 55 | <div class="flex flex-row">
|
52 |
| - <span class="flex-[1] mr-8"></span> |
53 |
| - <span class="flex-[4] mr-4"> |
| 56 | + <span class="flex-[1] mr-8" class:border-t={renderBorder} class:border-text={renderBorder}></span> |
| 57 | + <span class="flex-[4] mr-4" class:border-t={renderBorder} class:border-text={renderBorder}> |
54 | 58 | <Messages connection={connection} />
|
55 | 59 | </span>
|
56 |
| - <span class="flex-[1]"></span> |
| 60 | + <span class="flex-[1]" class:border-t={renderBorder} class:border-text={renderBorder}></span> |
57 | 61 | </div>
|
58 | 62 |
|
59 | 63 | <!-- 2nd row -->
|
|
78 | 82 | <div class="flex flex-row items-center text-3xl">
|
79 | 83 | <!-- Time Information -->
|
80 | 84 | <div class="flex-[1] mr-8">
|
81 |
| - <TimeComponent time={isDeparture ? connection?.departure : connection?.arrival} /> |
| 85 | + {#if renderInformation} |
| 86 | + <TimeComponent time={isDeparture ? connection?.departure : connection?.arrival} /> |
| 87 | + {/if} |
82 | 88 | </div>
|
83 | 89 |
|
84 | 90 | <div class="flex-[4] mr-4">
|
|
0 commit comments