summaryrefslogtreecommitdiff
path: root/templates/_connections_hafas.html.ep
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-10-27 18:36:35 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-10-27 18:36:35 +0200
commitadb830baa9cba8b02defdb63dbd1a2cf43998dc4 (patch)
tree35280814977f60e5b44ea3187dbde24ff8a8cf37 /templates/_connections_hafas.html.ep
parent357efdae358e8ed28c223c871802e419fcd2aa00 (diff)
parent7bf99b00a5064d231641b1309adacf6f1e8f42cb (diff)
Merge branch 'deingithub-dep-board-ui'
Diffstat (limited to 'templates/_connections_hafas.html.ep')
-rw-r--r--templates/_connections_hafas.html.ep59
1 files changed, 24 insertions, 35 deletions
diff --git a/templates/_connections_hafas.html.ep b/templates/_connections_hafas.html.ep
index 48a5380..d2b35ce 100644
--- a/templates/_connections_hafas.html.ep
+++ b/templates/_connections_hafas.html.ep
@@ -1,48 +1,26 @@
-<div><table class="striped"><tbody>
+<ul class="collection departures connections">
% for my $res (@{$connections}) {
% my ($train, $via, $via_arr) = @{$res};
% $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{};
- % my $td_class = '';
+ % my $row_class = '';
% my $link_class = 'action-checkin';
% if ($train->is_cancelled) {
- % $td_class = 'cancelled';
+ % $row_class = 'cancelled';
% $link_class = 'action-cancelled-from';
% }
% if ($checkin_from) {
- <tr class="<%= $link_class %>" data-station="<%= $train->station_eva %>" data-train="<%= $train->id %>" data-ts="<%= ($train->sched_datetime // $train->datetime)->epoch %>" data-dest="<%= $via->{name} %>">
+ <li class="collection-item <%= $row_class %> <%= $link_class %>"
+ data-station="<%= $train->station_eva %>"
+ data-train="<%= $train->id %>"
+ data-ts="<%= ($train->sched_datetime // $train->datetime)->epoch %>"
+ data-dest="<%= $via->{name} %>">
% }
% else {
- <tr>
+ <li class="collection-item">
% }
- <td class="<%= $td_class %>">
- % if ($train->platform) {
- % if ($checkin_from) {
- <a>Gleis <%= $train->platform %></a>
- % }
- % else {
- Gleis <%= $train->platform %>
- % }
- <br/>
- % }
- % if ($checkin_from) {
- <a><%= $train->line %></a>
- % }
- % else {
- %= $train->line
- % }
- </td>
- <td class="<%= $td_class %>">
- % if ($checkin_from) {
- <a><%= $via->{name} %></a>
- % }
- % else {
- %= $via->{name}
- % }
- </td>
- <td>
+ <a class="dep-time" href="#">
% if ($train->is_cancelled) {
%= $train->sched_datetime->strftime('%H:%M')
- ⊖
% }
% else {
%= $train->datetime->strftime('%H:%M')
@@ -53,7 +31,18 @@
% if ($train->delay) {
%= sprintf('(%+d)', $train->delay)
% }
- </td>
- </tr>
+ </a>
+ <span class="connect-platform-wrapper">
+ % if ($train->platform) {
+ <span>Gleis <%= $train->platform %></span>
+ % }
+ <span class="dep-line <%= $train->type // q{} %>">
+ %= $train->line
+ </span>
+ </span>
+ <span class="dep-dest">
+ %= $via->{name}
+ </span>
+ </li>
% }
-</tbody></table></div>
+</ul>