summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep16
-rw-r--r--templates/about.html.ep14
-rw-r--r--templates/app.html.ep20
-rw-r--r--templates/layouts/app.html.ep2
-rw-r--r--templates/layouts/legacy.html.ep2
5 files changed, 42 insertions, 12 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 425446a..f560950 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -118,12 +118,18 @@
</div> <!-- dataline -->
% if (my $wr = $departure->{wr}) {
<div class="wagonorder-preview">
-% my $direction = defined $wr->direction ? $wr->direction == 100 ? '→' : '←' : q{};
-% if ($departure->{wr_direction}) {
-% $direction = $departure->{wr_direction} eq 'l' ? '◀' : '▶';
+% my $left = defined $wr->direction ? $wr->direction == 100 ? q{} : '←' : q{};
+% my $right = defined $wr->direction ? $wr->direction == 100 ? '→' : q{} : q{};
+% if ($departure->{wr_direction} and $departure->{wr_direction} eq 'l') {
+% $left = '◀';
+% $right = q{};
+% }
+% elsif ($departure->{wr_direction} and $departure->{wr_direction} eq 'r') {
+% $left = q{};
+% $right = '▶';
% }
<a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{wr_direction} // '' %>">
- %= $direction
+ %= $left
% for my $entry ((defined $departure->{wr_direction_num} and $departure->{wr_direction_num} != $wr->direction) ? reverse @{$departure->{wr_preview} // []} : @{$departure->{wr_preview} // []}) {
% if ($entry->[1]) {
<span class="<%= $entry->[1] %>"><%= $entry->[0] %></span>
@@ -132,7 +138,7 @@
%= $entry->[0]
% }
% }
- %= $direction
+ %= $right
</a>
</div>
% }
diff --git a/templates/about.html.ep b/templates/about.html.ep
index b5af92b..a68dc69 100644
--- a/templates/about.html.ep
+++ b/templates/about.html.ep
@@ -20,10 +20,12 @@
Diese Installation nutzt
<strong>DBF v<%= stash('version') // '???' %></strong> mit folgenden Backends:
<ul>
- <li> Innerdeutscher Regional- und Fernverkehr: DB IRIS via <a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a>
+ <li>Innerdeutscher Regional- und Fernverkehr: DB IRIS via <a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a>
<strong>v<%= $Travel::Status::DE::IRIS::VERSION %></strong></li>
- <li> Außerdeutsche Fahrten, Nahverkehr, Details, Karten: HAFAS via <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a>
+ <li>Außerdeutsche Fahrten, Nahverkehr, Details, Karten: HAFAS via <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a>
<strong>v<%= $Travel::Status::DE::HAFAS::VERSION %></strong></li>
+ <li>Nahverkehr: EFA via <a href="https://finalrewind.org/projects/Travel-Status-DE-VRR/">Travel::Status::DE::EFA</a>
+ <strong>v<%= $Travel::Status::DE::EFA::VERSION %></strong></li>
<li>Wagenreihung: <a href="https://finalrewind.org/projects/Travel-Status-DE-DBWagenreihung/">Travel::Status::DE::DBWagenreihung</a>
<strong>v<%= $Travel::Status::DE::DBWagenreihung::VERSION %></strong></li>
<li>Zugauslastung Regionalverkehr: VRR EFA via <a href="https://github.com/derf/eva-to-efa-gw">eva-to-efa-gw</a></li>
@@ -38,6 +40,14 @@
</ul>
</p>
<p>
+ Unterstützte EFA-Instanzen („efa=…“, unfertig/experimentell):
+ <ul>
+ % for my $service (Travel::Status::DE::EFA::get_efa_urls()) {
+ <li><%= $service->{shortname} %> (<%= $service->{name} %>)</li>
+ % }
+ </ul>
+ </p>
+ <p>
Verwendete Open Data-Ressourcen:
<ul>
<li><a href="https://data.deutschebahn.com/dataset/zugbildungsplanzugbildungsplan-zpar">Zugbildungsplan</a> © DB Fernverkehr AG, lizensiert unter CC-BY 4.0</li>
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 50f8a5a..e81191b 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>
@@ -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>
@@ -165,7 +177,9 @@
%= $route_str
</span>
% }
- </a>
+% if (not param('efa')) {
+ </a>
+% }
</li>
% }
diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep
index 9c39019..8e89e46 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 = 'v99'; # asset version
+ % my $av = 'v100'; # 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 5389c4b..09b94e6 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 = 'v99'; # asset version
+ % my $av = 'v100'; # asset version
%= stylesheet "/static/${av}/css/legacy.css"
%= stylesheet "/static/${av}/css/material-icons.css"
%= stylesheet "/static/${av}/css/jquery-ui.min.css"