diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-09-27 20:41:05 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-09-27 20:41:05 +0200 |
commit | 5f8418a255d9384305e2fa7e08a11aa442e69921 (patch) | |
tree | f063adfe2d370d6d2f1ed470557ef1ef8b5d55a3 /templates | |
parent | 9ae7fa5bb5ee4bb76c0a1bae89d9288aa949b5b3 (diff) |
show train class based on IRIS data3.3.6
Diffstat (limited to 'templates')
-rw-r--r-- | templates/app.html.ep | 24 | ||||
-rw-r--r-- | templates/layouts/app.html.ep | 2 | ||||
-rw-r--r-- | templates/layouts/legacy.html.ep | 2 |
3 files changed, 4 insertions, 24 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep index 9b7f8ab..7e23bc8 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -29,31 +29,11 @@ % $via_cur++; % $route_str .= $stop . ($via_cur < $via_max ? ' - ' : q{}); % } -% my $linetype = 'bahn'; -% if ( $departure->{train_type} eq 'S' ) { -% $linetype = 'sbahn'; -% } -% elsif ( $departure->{train_type} eq 'IC' -% or $departure->{train_type} eq 'ICE' -% or $departure->{train_type} eq 'EC' -% or $departure->{train_type} eq 'ECE' -% or $departure->{train_type} eq 'EN') { -% $linetype = 'fern'; -% } -% elsif ( $departure->{train_type} eq 'THA' -% or $departure->{train_type} eq 'TGV' -% or $departure->{train_type} eq 'FLX' -% or $departure->{train_type} eq 'NJ') { -% $linetype = 'ext'; -% } -% elsif ( $departure->{train_line} and $departure->{train_line} =~ m{^S\d} ) { -% $linetype = 'sbahn'; -% } <li data-train="<%= ($departure->{train_type} // q{}) %> <%= ($departure->{train_no} // $departure->{train} // q{}) %>" data-line="<%= $departure->{train_type} %> <%= $departure->{train_line} // $departure->{train_no} %>" data-no="<%= $departure->{train_line} ? $departure->{train_no} : q{} %>" - data-linetype="<%= $linetype %>" + data-linetype="<%= $departure->{linetype} %>" data-from="<%= $departure->{origin} // q{???} %>" data-to="<%= $departure->{destination} // q{???} %>" data-platform="<%= $departure->{scheduled_platform} // $departure->{platform} // '' %>" @@ -70,7 +50,7 @@ % else { > % } - <div class="line <%= $linetype %>"> + <div class="line <%= $departure->{linetype} %>"> % if ($departure->{train_type} and $departure->{train_no}) { %= $departure->{train_type} % } diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index 1282080..cafa0b7 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -18,7 +18,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v32'; # asset version + % my $av = 'v33'; # asset version % if (session('theme') and session('theme') eq 'dark' or param('dark')) { %= stylesheet "/static/${av}/css/dark.min.css", id => 'theme' % } diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index b885bef..869707a 100644 --- a/templates/layouts/legacy.html.ep +++ b/templates/layouts/legacy.html.ep @@ -17,7 +17,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v32'; # asset version + % my $av = 'v33'; # asset version %= stylesheet "/static/${av}/css/default.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" |