blob: db801149705eb2696629368535f6d3bb55341b75 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
<div class="container">
<div style="text-align: center;">
%= $wr->train_type
%= $wr->train_no
</div>
<!-- <div style="text-align: center;">
??? → ???
</div> -->
<%= $wr->station_name %> Gleis <%= $wr->platform %><br/>
Zugtyp: <%= $wr->train_subtype // 'IC?' %>
</div>
</div>
<div class="container">
<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;';
% }
% if ($wagon->is_locomotive or $wagon->is_powercar) {
% $bg = 'background-color: #cccccc;';
% }
<div style="position: absolute; left: 6em;
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;">
% if ($wr->direction == 100) {
↓
% }
% else {
↑
% }
</div>
<div style="position: absolute; left: 3em;
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;
min-width: 2em; text-align: right;
border: 1px solid black; padding-left: 0.2em; padding-right: 0.2em; <%= $bg %>">
% if ($wagon->is_locomotive or $wagon->is_powercar) {
LOK
% }
% else {
%= $wagon->number // '?'
% }
</div>
<div style="position: absolute; left: 7em; right: 0em;
top: <%= $wagon->{position}{start_percent} %>%; bottom: <%= 100 - $wagon->{position}{end_percent} %>%;">
% if ($wagon->is_first_class) {
<span style="display: inline-block; width: 0.8em; text-align: center; color: #ffffff; background-color: #666666; border: 1px solid #666666;">1</span>
% }
% if ($wagon->is_second_class) {
<span style="display: inline-block; width: 0.8em; text-align: center; color: #666666; border: 1px solid #666666;">2</span>
% }
% if ($wagon->has_accessibility) {
♿
% }
% if ($wagon->has_bistro) {
🍴
% }
% if ($wagon->has_compartments) {
🚪
% }
% if ($wagon->has_quiet_area) {
🔇
% }
% if ($wagon->has_phone_area) {
📱
% }
% if ($wagon->has_family_area) {
👪
% }
% if ($wagon->has_bahn_comfort) {
bahn.comfort
% }
% if ($wagon->is_interregio) {
Interregio
% }
<span style="color: #999999;">
%= $wagon->type
</span>
</div>
% }
</div>
<!-- <div>
Legende: ♿ Behindertengerechte Ausstattung / 🍴 Bistro/Restaurant / 🚪 Abteile vorhanden
</div>
-->
<div>
% if ($wr->train_type ne 'ICE') {
Angaben bitte mit Vorsicht genießen. Eigentlich werden vom Backend nur
ICE unterstützt.
% }
% else {
Angaben ohne Gewähr – Echtzeitdaten sind möglicherweise nicht berücksichtigt.
% }
</div>
</div>
|