From 383ec3feb305645a63cc03b6f0f1b8cf8c3fd368 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 25 Sep 2022 17:11:54 +0200 Subject: connections: platform on the left, times on the right; similar to departure board --- templates/_connections.html.ep | 39 +++++++++++++++++++++------------------ templates/_transit_fyi.html.ep | 11 +++++++---- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep index a8b74f7..087beca 100644 --- a/templates/_connections.html.ep +++ b/templates/_connections.html.ep @@ -22,30 +22,23 @@ %= $train->line % }
- % if ($checkin_from) { - - % } - % if ($train->departure_is_cancelled) { - %= $train->sched_departure->strftime('%H:%M') - ⊖ - % } - % else { - %= $train->departure->strftime('%H:%M') - % if ($train->departure_delay) { - %= sprintf('(%+d)', $train->departure_delay) + % if ($train->platform) { + % if ($checkin_from) { + Gleis <%= $train->platform %> + % } + % else { + Gleis <%= $train->platform %> % } - % } - % if ($checkin_from) { - % } % if ($checkin_from) { - <%= $via %>
<%= $via_arr %>
+ <%= $via %> % } % else { - <%= $via %>
<%= $via_arr %> + %= $via % } +
% if ($train->{interchange_icon}) { <%= $train->{interchange_icon} %> % } @@ -66,8 +59,18 @@ % } - % if ($train->platform) { - Gleis <%= $train->platform %>
+ % 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) % } diff --git a/templates/_transit_fyi.html.ep b/templates/_transit_fyi.html.ep index 42233e5..5951e7d 100644 --- a/templates/_transit_fyi.html.ep +++ b/templates/_transit_fyi.html.ep @@ -5,15 +5,18 @@ %= $info->{line} -
+ + + %= $via + + %= $info->{departure}->strftime('%H:%M') + → + %= $via_arr % if ($info->{departure_delay}) { %= sprintf('(%+d)', $info->{departure_delay}) % } - - <%= $via %>
<%= $via_arr %> - % } -- cgit v1.2.3