summaryrefslogtreecommitdiff
path: root/templates/app.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-05-30 21:27:21 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-05-30 21:27:21 +0200
commit30740872067ea3869e2b513ad8eb734e268a3e3a (patch)
treec30bbc6f6d94a2668f9edfe96bb190c75a3a1242 /templates/app.html.ep
parentcc3954dd065b91ee2ce36044fcaf111873d0ae47 (diff)
departure list: show delay next to time
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r--templates/app.html.ep62
1 files changed, 30 insertions, 32 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 9ac7304..4a45c99 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -94,45 +94,44 @@
% }
<span class="time <%= ($show_realtime and $departure->{delay} and not
$departure->{is_cancelled}) ? 'delayed' : q{} %>">
-% if (param('detailed')) {
-% my $arrow = '→';
-% if (not $departure->{sched_arrival}) {
-% $arrow = '↦';
-% }
-% elsif (not $departure->{sched_departure}) {
-% $arrow = '⇥';
-% }
-% if ($show_realtime) {
-%= ($departure->{arrival} // q{}) . $arrow . ($departure->{departure} // q{})
-% }
-% else {
-%= ($departure->{sched_arrival} // q{}) . $arrow . ($departure->{sched_departure} // q{})
-% }
-% }
-% else {
-%= $departure->{time}
-% }
- </span>
- <span class="countdown">
-% if ($departure->{delay} and not $departure->{is_cancelled}) {
-% my $aria_delay = sprintf("Verspätung %d Minuten", $departure->{delay});
-% if ($show_realtime) {
-% if ($departure->{delay} > 0) {
- <span class="delaynorm" aria-label="<%= $aria_delay %>">(+<%= $departure->{delay} %>)</span>
+% if ($departure->{delay} and not $departure->{is_cancelled}) {
+% my $aria_delay = sprintf("Verspätung %d Minuten", $departure->{delay});
+% if ($show_realtime) {
+% if ($departure->{delay} > 0) {
+ <span class="delaynorm" aria-label="<%= $aria_delay %>">(+<%= $departure->{delay} %>)</span>
+% }
+% else {
+ <span class="undelaynorm" aria-label="<%= $aria_delay %>">(<%= $departure->{delay} %>)</span>
+% }
% }
% else {
- <span class="undelaynorm" aria-label="<%= $aria_delay %>">(<%= $departure->{delay} %>)</span>
+% if ($departure->{delay} > 0) {
+ <span class="delay" aria-label="<%= $aria_delay %>">(+<%= $departure->{delay} %>)</span>
+% }
+% else {
+ <span class="undelay" aria-label="<%= $aria_delay %>">(<%= $departure->{delay} %>)</span>
+% }
% }
% }
-% else {
-% if ($departure->{delay} > 0) {
- <span class="delay" aria-label="<%= $aria_delay %>">(+<%= $departure->{delay} %>)</span>
+% if (param('detailed')) {
+% my $arrow = '→';
+% if (not $departure->{sched_arrival}) {
+% $arrow = '↦';
+% }
+% elsif (not $departure->{sched_departure}) {
+% $arrow = '⇥';
+% }
+% if ($show_realtime) {
+%= ($departure->{arrival} // q{}) . $arrow . ($departure->{departure} // q{})
% }
% else {
- <span class="undelay" aria-label="<%= $aria_delay %>">(<%= $departure->{delay} %>)</span>
+%= ($departure->{sched_arrival} // q{}) . $arrow . ($departure->{sched_departure} // q{})
% }
% }
-% }
+% else {
+%= $departure->{time}
+% }
+ </span>
% if (($departure->{scheduled_platform} and $departure->{platform} and
% $departure->{scheduled_platform} ne $departure->{platform})
% or $departure->{changed_platform}) {
@@ -143,7 +142,6 @@
% }
%= $departure->{platform}
</span>
- </span>
% if ($departure->{info} and length $departure->{info}) {
<span class="info">
%= $departure->{info}