Jacek Kowalski
2020-01-27 30782c2fb91e4f6f25c5b8411d37c5edae8d03aa
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
102
103
104
105
106
107
108
<!DOCTYPE html>
<title>Vehicles on lines (TTSS-based)</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
 
<style type="text/css">
table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 10px 0;
}
caption {
    text-align: left;
    font-size: 120%;
}
th, td {
    border: 1px solid black;
    padding: 5px;
}
td {
    vertical-align: top;
}
table.center td {
    text-align: center;
}
a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.low {
    color: #000;
}
.low0 {
    color: #C70;
}
.low1, .low2 {
    color: #070;
}
</style>
 
<table class="center">
<caption>Vehicles by line</caption>
<thead>
<tr>
{% for line in lines|keys %}
<th>{{ line | e }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
<tr>
{% for trips in lines %}
<td>
{% for trip in trips %}
<a href="https://mpk.jacekk.net/map.html#!{{ prefix }}{{ trip.vehicle.trip | e }}" class="low{{ trip.vehicle.low | default }}">
{{ trip.vehicle.num | default('<?>') | e }}<br />
</a>
{% endfor %}
</td>
{% endfor %}
</tr>
</tbody>
</table>
 
<table>
<caption>Vehicles by type</caption>
{% for type, vhcls in vehicles %}
<tr>
<th>{{ type }}</th>
<td>{{ vhcls | length }}</td>
<td>
{% for vehicle in vhcls %}
<a href="https://mpk.jacekk.net/map.html#!{{ prefix }}{{ vehicle.trip | e }}" class="low{{ vehicle.low | default }}">
{{ vehicle.num | default('<?>') | e }}
</a>
{% endfor %}
</td>
</tr>
{% endfor %}
</table>
 
<table>
<caption>Vehicles in TTSS</caption>
<thead>
<tr>
<th>Vehicle</th> <th>Line</th> <th>Last seen</th>
</tr>
</thead>
{% for map in mapping %}
<tr>
<td>
{{ map.num | e }}
</td>
<td>
{{ map.line | default('?') | e }}
</td>
<td>
{{ map.date | time_diff | default('now') }}
</td>
</tr>
{% endfor %}
</table>
 
Generated at {{ "now" | date("Y-m-d H:i:s P") }}
 
</table>