diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-27 18:36:35 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2023-10-27 18:36:35 +0200 |
commit | adb830baa9cba8b02defdb63dbd1a2cf43998dc4 (patch) | |
tree | 35280814977f60e5b44ea3187dbde24ff8a8cf37 /templates/_connections.html.ep | |
parent | 357efdae358e8ed28c223c871802e419fcd2aa00 (diff) | |
parent | 7bf99b00a5064d231641b1309adacf6f1e8f42cb (diff) |
Merge branch 'deingithub-dep-board-ui'
Diffstat (limited to 'templates/_connections.html.ep')
-rw-r--r-- | templates/_connections.html.ep | 74 |
1 files changed, 34 insertions, 40 deletions
diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep index cd64150..97c53e0 100644 --- a/templates/_connections.html.ep +++ b/templates/_connections.html.ep @@ -1,39 +1,48 @@ -<div><table class="striped"><tbody> +<ul class="collection departures connections"> % for my $res (@{$connections}) { % my ($train, $via, $via_arr, $load) = @{$res}; % $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{}; - % my $td_class = ''; + % my $row_class = ''; % my $link_class = 'action-checkin'; % if ($train->is_cancelled) { - % $td_class = 'cancelled'; + % $row_class = 'cancelled'; % $link_class = 'action-cancelled-from'; % } % if ($checkin_from) { - <tr class="<%= $link_class %>" data-station="<%= $train->station_uic %>" data-train="<%= $train->train_id %>" data-ts="<%= ($train->sched_departure // $train->departure)->epoch %>" data-dest="<%= $via->{name} %>"> + <li class="collection-item <%= $row_class %> <%= $link_class %>" + data-station="<%= $train->station_uic %>" + data-train="<%= $train->train_id %>" + data-ts="<%= ($train->sched_departure // $train->departure)->epoch %>" + data-dest="<%= $via->{name} %>"> % } % else { - <tr> + <li class="collection-item"> % } - <td class="<%= $td_class %>"> - % if ($train->platform) { - % if ($checkin_from) { - <a>Gleis <%= $train->platform %></a> - % } - % else { - Gleis <%= $train->platform %> - % } - <br/> - % } - % if ($checkin_from) { - <a><%= $train->line %></a> + <a class="dep-time" href="#"> + % if ($train->departure_is_cancelled) { + %= $train->sched_departure->strftime('%H:%M') % } % else { - %= $train->line + %= $train->departure->strftime('%H:%M') + % } + % if ($via_arr) { + → <%= $via_arr %> % } - </td> - <td class="<%= $td_class %>"> - % if ($checkin_from) { - <a><%= $via->{name} %></a> + % if ($train->departure_delay) { + %= sprintf('(%+d)', $train->departure_delay) + % } + </a> + <span class="connect-platform-wrapper"> + % if ($train->platform) { + <span>Gleis <%= $train->platform %></span> + % } + <span class="dep-line <%= $train->type // q{} %>"> + %= $train->line + </span> + </span> + <span class="dep-dest"> + % if ($train->is_cancelled) { + Fahrt nach <%= $via->{name} %> entfällt % } % else { %= $via->{name} @@ -61,22 +70,7 @@ % if ($train->{message_id}{70} or $train->{message_id}{71}) { <i class="material-icons tiny" aria-label="Ohne WLAN">portable_wifi_off</i> % } - </td> - <td> - % if ($train->departure_is_cancelled) { - %= $train->sched_departure->strftime('%H:%M') - ⊖ - % } - % else { - %= $train->departure->strftime('%H:%M') - % } - % if ($via_arr) { - → <%= $via_arr %> - % } - % if ($train->departure_delay) { - %= sprintf('(%+d)', $train->departure_delay) - % } - </td> - </tr> + </span> + </li> % } -</tbody></table></div> +</ul> |