diff options
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r-- | templates/app.html.ep | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep index 50f8a5a..a499dd7 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -53,9 +53,9 @@ > % } % if (param('hafas')) { - <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?hafas=1&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>"> + <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?hafas=' . Mojo::Util::url_escape(param('hafas')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>"> % } -% else { +% elsif (not param('efa')) { <a href="/z/<%= Mojo::Util::url_escape(($departure->{train_type} // q{}) . ' ' . ($departure->{train_no} // $departure->{train} // q{})) . '/' . Mojo::Util::url_escape($departure->{station} // $station) %>"> % } <div class="anchor" id="<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>"></div> @@ -100,8 +100,7 @@ %= $departure->{origin} </span> % } - <span class="time <%= ($show_realtime and $departure->{delay} and not - $departure->{is_cancelled}) ? 'delayed' : q{} %>"> + <span class="time <%= $show_realtime ? get_rt_time_class($departure) : q{} %>"> % if ($departure->{delay} and not $departure->{is_cancelled}) { % if ($show_realtime) { % if ($departure->{delay} > ($hide_low_delay ? 4 : 0)) { @@ -151,6 +150,18 @@ % else { <span class="platform"> % } +% if ($departure->{load}{FIRST} or $departure->{load}{SECOND}) { +% my ($text, $icon1, $icon2) = utilization_icon([$departure->{load}{FIRST}, $departure->{load}{SECOND}]); + <span class="load"> + <i class="material-icons" style="vertical-align: bottom;" aria-hidden="true"><%= $icon2 %></i> + </span> +% } +% elsif (my $o = $departure->{occupancy}) { + <span class="load"> +% my ($text, $icon) = occupancy_icon($o); + <i class="material-icons" style="vertical-align: bottom;" aria-hidden="true"><%= $icon %></i> + </span> +% } <span class="visually-hidden">Gleis</span> %= $departure->{platform} </span> @@ -165,7 +176,9 @@ %= $route_str </span> % } - </a> +% if (not param('efa')) { + </a> +% } </li> % } |