Add non-passenger locations to train detail and prepare for 'pass' times to be made available from API.

This commit is contained in:
Fred Boniface 2024-04-17 12:20:50 +01:00
parent 21eabfc7d7
commit 8c91a50a34

View File

@ -80,30 +80,29 @@
})} })}
</p> </p>
<table> <table>
<caption>Grey times are non-passenger stops, italics are 'pass' times</caption>
<tr> <tr>
<th>Location</th> <th>Location</th>
<th>Sch Arr.</th> <th>Sch Arr.</th>
<th>Sch Dep.</th> <th>Sch Dep.</th>
</tr> </tr>
{#if serviceDetail.stops[0]['publicDeparture']}
{#each serviceDetail.stops as stop}
{#if stop.publicArrival || stop.publicDeparture}
<tr>
<td>{stop.tiploc}</td>
<td>{stop.publicArrival || '-'}</td>
<td>{stop.publicDeparture || '-'}</td>
</tr>
{/if}
{/each}
{:else}
{#each serviceDetail.stops as stop} {#each serviceDetail.stops as stop}
<tr> <tr>
{#if stop.publicArrival || stop.publicDeparture}
<td>{stop.tiploc}</td> <td>{stop.tiploc}</td>
<td>{stop.wttArrival || '-'}</td> <td>{stop.publicArrival || '-'}</td>
<td>{stop.wttDeparture || '-'}</td> <td>{stop.publicDeparture || '-'}</td>
{:else if stop.wttArrival || stop.wttDeparture}
<td class="wtt">{stop.tiploc}</td>
<td class="wtt">{stop.wttArrival || '-'}</td>
<td class="wtt">{stop.wttDeparture || '-'}</td>
{:else}
<td class="pass">{stop.tiploc}</td>
<td class="pass">-</td>
<td class="pass">-</td>
{/if}
</tr> </tr>
{/each} {/each}
{/if}
</table> </table>
{/if} {/if}
{:catch} {:catch}
@ -167,10 +166,21 @@
} }
table { table {
margin: auto; margin: auto;
padding-top: 10px; padding-top: 5px;
padding-bottom: 10px; padding-bottom: 10px;
color: var(--island-text-color); color: var(--island-text-color);
} }
caption {
padding-top: 15px;
font-size: small;
}
.wtt {
opacity: 0.5;
}
.pass {
font-style: italic;
opacity: 0.5;
}
.text-message { .text-message {
margin: 5px; margin: 5px;
margin-left: 20px; margin-left: 20px;