From 0504f1adcd12c573ab805894b96a7658e2cd74fa Mon Sep 17 00:00:00 2001 From: Cassidy Dingenskirchen Date: Sun, 22 Oct 2023 16:16:41 +0200 Subject: departure board: some more styling consistency --- templates/_departures_hafas.html.ep | 22 ++++++++++++++-------- templates/_departures_iris.html.ep | 24 +++++++++++++++--------- 2 files changed, 29 insertions(+), 17 deletions(-) (limited to 'templates') diff --git a/templates/_departures_hafas.html.ep b/templates/_departures_hafas.html.ep index 58bdb02..a10594e 100644 --- a/templates/_departures_hafas.html.ep +++ b/templates/_departures_hafas.html.ep @@ -22,7 +22,7 @@ data-train="<%= $result->id %>" data-ts="<%= ($result->sched_datetime // $result->datetime)->epoch %>" > - + %= $result->datetime->strftime('%H:%M') % if ($result->delay) { (<%= sprintf('%+d', $result->delay) %>) @@ -30,18 +30,24 @@ % elsif (not defined $result->delay and not $result->is_cancelled) { gps_off % } - - - %= $result->line - - + + + %= $result->line + + + % if ($result->is_cancelled) { + Fahrt nach <%= $result->destination %> entfällt + % } + % else { %= $result->destination % for my $checkin (@{$checkin_by_train->{$result->id} // []}) { - people <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> + people + <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> % } - + % } + % } diff --git a/templates/_departures_iris.html.ep b/templates/_departures_iris.html.ep index 2c47016..332ef1c 100644 --- a/templates/_departures_iris.html.ep +++ b/templates/_departures_iris.html.ep @@ -22,7 +22,7 @@ data-train="<%= $result->train_id %>" data-ts="<%= ($result->sched_departure // $result->departure)->epoch %>" > - + % if ($result->departure_hidden) { (<%= $result->departure->strftime('%H:%M') %>) % } @@ -35,16 +35,22 @@ % elsif (not $result->has_realtime and $result->start->epoch < $now_epoch) { gps_off % } - - - %= $result->line + + %= $result->line + - %= $result->destination - % for my $checkin (@{$checkin_by_train->{$result->train_id} // []}) { - - people <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> - + % if ($result->is_cancelled) { + Fahrt nach <%= $result->destination %> entfällt + % } + % else { + %= $result->destination + % for my $checkin (@{$checkin_by_train->{$result->train_id} // []}) { + + people + <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> + + % } % } -- cgit v1.2.3