blob: 642c46044274a72cf3149fa4584719c7012e9c5c (
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
31
32
33
|
<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: 60ex;">
% for my $section ($wr->sections) {
<div style="position: absolute; left: 1em; width: 2em;
top: <%= $section->{start_percent} %>%; bottom: <%= 100 - $section->{end_percent} %>%; text-align: center;">
%= $section->{name}
</div>
% }
% for my $wagon ($wr->wagons) {
% my $bg = '';
% if ($wagon->is_first_class) {
% $bg = 'background-color: #ffff99;';
% }
<div style="position: absolute; left: 3em; right: 0em;
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;
border: 1px solid black; <%= $bg %>">
% if ($wagon->is_locomotive or $wagon->is_powercar) {
LOK
% }
% else {
%= $wagon->number // '?'
% }
%= $wagon->type
</div>
% }
</div>
</div>
|