diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/app.html.ep | 6 | ||||
-rw-r--r-- | templates/layouts/default.html.ep | 2 | ||||
-rw-r--r-- | templates/wagenreihung.html.ep | 30 |
3 files changed, 38 insertions, 0 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep index 88e6586..80e17d2 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -143,6 +143,12 @@ % } % } </div> <!-- timeinfo --> +% if ($linetype eq 'fern' and $departure->{wr_link}) { + <div class="verbose"> + <a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>">Wagenreihung</a> + </div> +% } + % } % if ($departure->{route_post_diff} and @{$departure->{route_post_diff}}) { <div class="mroute"> diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index d7d6e70..163955b 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -232,6 +232,8 @@ nur Züge via Bochum oder Hamm)</li> <a href="https://finalrewind.org/projects/db-fakedisplay/">db-infoscreen</a> v<%= stash('version') // '???' %><br/> Backends:<br/> +<!--<a href="https://finalrewind.org/projects/Travel-Status-DE-DBWagenreihung/">-->Travel::Status::DE::DBWagenreihung<!--</a>--> +v<%= $Travel::Status::DE::DBWagenreihung::VERSION %><br/> <a href="https://finalrewind.org/projects/Travel-Status-DE-DeutscheBahn/">Travel::Status::DE::HAFAS</a> v<%= $Travel::Status::DE::HAFAS::VERSION %><br/> <a href="https://finalrewind.org/projects/Travel-Status-DE-IRIS/">Travel::Status::DE::IRIS</a> diff --git a/templates/wagenreihung.html.ep b/templates/wagenreihung.html.ep new file mode 100644 index 0000000..9055f00 --- /dev/null +++ b/templates/wagenreihung.html.ep @@ -0,0 +1,30 @@ +<div class="container"> +<div style="height: 2em;"> +(experimentell, die URL wird sich noch ändern und die Anzeige wird noch schöner) +</div> + +<div style="position: relative; width: 100%; height: 2em;"> +% for my $section ($wr->sections) { +<div style="position: absolute; left: <%= $section->{start_percent} %>%; right: <%= 100 - $section->{end_percent} %>%; top: 0em; bottom: 0em; text-align: center;"> +%= $section->{name} +</div> +% } +</div> +<div style="position: relative; width: 100%; height: 2em;"> +% for my $wagon ($wr->wagons) { +% my $bg = ''; +% if ($wagon->is_first_class) { +% $bg = 'background-color: #ffff99;'; +% } +<div style="position: absolute; left: <%= $wagon->{position}{start_percent} %>%; right: <%= 100 - $wagon->{position}{end_percent} %>%; top: 0em; bottom: 0em; border: 1px solid black; text-align: center; <%= $bg %>"> +% if ($wagon->is_locomotive or $wagon->is_powercar) { +LOK +% } +% else { +%= $wagon->{number} // '?' +% } +</div> +% } +</div> + +</div> |