diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-31 20:18:22 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-31 20:18:22 +0200 |
commit | b1591eed543b355cf30d77c6b9ec886fc5eb79b4 (patch) | |
tree | 630e5435522114ac1cfbfb531a0bf8a4d848a3e0 /templates/_public_status_card.html.ep | |
parent | 155f9f39cc83fcf83e5dd48ae58b09736281c912 (diff) |
show current/next stop while checked in
Diffstat (limited to 'templates/_public_status_card.html.ep')
-rw-r--r-- | templates/_public_status_card.html.ep | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep index ebf989b..510bf52 100644 --- a/templates/_public_status_card.html.ep +++ b/templates/_public_status_card.html.ep @@ -70,8 +70,56 @@ noch nicht bekannt % } </div> + <div class="center-align hide-on-small-only"> + % for my $station (@{$journey->{route_after}}) { + % if ($station->[0] eq $journey->{arr_name}) { + % last; + % } + % if (($station->[1]{rt_arr_countdown} // 0) > 0) { + <%= $station->[0] %><br/><%= $station->[1]{rt_arr}->strftime('%H:%M') %> + % if ($station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) { + %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60); + % } + % last; + % } + % if (($station->[1]{rt_dep_countdown} // 0) > 0) { + <%= $station->[0] %><br/> + <%= $station->[1]{rt_arr}->strftime('%H:%M') %> → + <%= $station->[1]{rt_dep}->strftime('%H:%M') %> + % if ($station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) { + %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60); + % } + % last; + % } + % } + </div> <div style="clear: both;"> </div> + <div class="hide-on-med-and-up" style="margin-top: 2ex;"> + % for my $station (@{$journey->{route_after}}) { + % if ($station->[0] eq $journey->{arr_name}) { + % last; + % } + % if (($station->[1]{rt_arr_countdown} // 0) > 0) { + Nächster Halt:<br/> + <%= $station->[0] %><br/><%= $station->[1]{rt_arr}->strftime('%H:%M') %> + % if ($station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) { + %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60); + % } + % last; + % } + % if (($station->[1]{rt_dep_countdown} // 0) > 0) { + Aktueller Halt:<br/> + <%= $station->[0] %><br/> + <%= $station->[1]{rt_arr}->strftime('%H:%M') %> → + <%= $station->[1]{rt_dep}->strftime('%H:%M') %> + % if ($station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) { + %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60); + % } + % last; + % } + % } + </div> </p> % if (@{$journey->{messages} // []} > 0 and $journey->{messages}[0]) { <p style="margin-bottom: 2ex;"> |