blob: 9055f00d58e36f4eaabb220936afa03e15ca650e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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>
|