summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm1
-rw-r--r--sass/app.scss6
-rw-r--r--templates/app.html.ep12
3 files changed, 19 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index 4691a86..f537064 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -1925,6 +1925,7 @@ sub handle_result {
origin => $result->route_end =~ s{,\Q$city\E}{}r,
platform => $result->platform,
scheduled_platform => $result->sched_platform,
+ load => $result->load // {},
info => $info,
is_cancelled => $result->is_cancelled,
linetype => $linetype,
diff --git a/sass/app.scss b/sass/app.scss
index fb81921..347133e 100644
--- a/sass/app.scss
+++ b/sass/app.scss
@@ -382,6 +382,12 @@ div.app {
}
}
+ .load {
+ color: $fg;
+ font-weight: normal;
+ margin-right: 0.5em;
+ }
+
.platform {
background-color: transparent;
font-size: 3em;
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 50f8a5a..214bee1 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -151,6 +151,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>