summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-05-31 20:18:22 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-05-31 20:18:22 +0200
commitb1591eed543b355cf30d77c6b9ec886fc5eb79b4 (patch)
tree630e5435522114ac1cfbfb531a0bf8a4d848a3e0 /templates
parent155f9f39cc83fcf83e5dd48ae58b09736281c912 (diff)
show current/next stop while checked in
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep48
-rw-r--r--templates/_public_status_card.html.ep48
2 files changed, 96 insertions, 0 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 0683ae5..df5d260 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -62,8 +62,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]) {
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;">