diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-05 01:55:56 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-05 01:55:56 +0200 |
commit | 19936c51bd4ac85c45e583f69f327e514dba99d4 (patch) | |
tree | 33073a0705c930fb314cbcf07436b2de29fbc387 /templates | |
parent | 67ac062479ca74cea7dd7cacccaa30a6176caa01 (diff) |
app: add linetype data element
Diffstat (limited to 'templates')
-rw-r--r-- | templates/app.html.ep | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep index e29caef..abfd79a 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -32,18 +32,6 @@ % $via_cur++; % $route_str .= $stop . ($via_cur < $via_max ? ' - ' : q{}); % } - <li - data-train="<%= ($departure->{train_type} // '') %> <%= ($departure->{train_no} // $departure->{train} // '') %>" - data-from="<%= $departure->{origin} // q{???} %>" - data-to="<%= $departure->{destination} // q{???} %>" -% my $extraclasses = q{}; -% if ($departure->{is_cancelled} or $departure->{departure_is_cancelled}) { -% $extraclasses .= ' cancelled'; - class="cancelled"> -% } -% else { - > -% } % my $linetype = 'bahn'; % if ( $departure->{train_type} eq 'S' ) { % $linetype = 'sbahn'; @@ -59,7 +47,19 @@ % or $departure->{train_type} eq 'NJ') { % $linetype = 'ext'; % } -% + <li + data-train="<%= ($departure->{train_type} // '') %> <%= ($departure->{train_no} // $departure->{train} // '') %>" + data-linetype="<%= $linetype %>" + data-from="<%= $departure->{origin} // q{???} %>" + data-to="<%= $departure->{destination} // q{???} %>" +% my $extraclasses = q{}; +% if ($departure->{is_cancelled} or $departure->{departure_is_cancelled}) { +% $extraclasses .= ' cancelled'; + class="cancelled"> +% } +% else { + > +% } <div class="line <%= $linetype %>"> % if ($departure->{train_type} and $departure->{train_no}) { %= $departure->{train_type} |