Jacek Kowalski
2023-11-06 85e6c26acb0778dda25dcc4a8b2cecada7a12536
commit | author | age
c077c7 1 <!DOCTYPE html>
JK 2 <title>Vehicles on lines (TTSS-based)</title>
30782c 3 <meta charset="utf-8" />
c077c7 4 <meta name="viewport" content="width=device-width, initial-scale=1" />
JK 5
6 <style type="text/css">
7 table {
8     border-collapse: collapse;
9     border-spacing: 0;
51c6b4 10     margin: 10px 0;
JK 11 }
12 caption {
13     text-align: left;
14     font-size: 120%;
c077c7 15 }
JK 16 th, td {
17     border: 1px solid black;
18     padding: 5px;
19 }
20 td {
21     vertical-align: top;
51c6b4 22 }
JK 23 table.center td {
c077c7 24     text-align: center;
JK 25 }
26 a {
27     text-decoration: none;
28 }
29 a:hover {
30     text-decoration: underline;
31 }
32 .low {
33     color: #000;
34 }
35 .low0 {
36     color: #C70;
37 }
38 .low1, .low2 {
39     color: #070;
40 }
41 </style>
42
51c6b4 43 <table class="center">
JK 44 <caption>Vehicles by line</caption>
c077c7 45 <thead>
JK 46 <tr>
47 {% for line in lines|keys %}
48 <th>{{ line | e }}</th>
49 {% endfor %}
50 </tr>
51 </thead>
52 <tbody>
53 <tr>
54 {% for trips in lines %}
55 <td>
56 {% for trip in trips %}
51c6b4 57 <a href="https://mpk.jacekk.net/map.html#!{{ prefix }}{{ trip.vehicle.trip | e }}" class="low{{ trip.vehicle.low | default }}">
c077c7 58 {{ trip.vehicle.num | default('<?>') | e }}<br />
JK 59 </a>
60 {% endfor %}
61 </td>
62 {% endfor %}
63 </tr>
64 </tbody>
51c6b4 65 </table>
JK 66
67 <table>
68 <caption>Vehicles by type</caption>
69 {% for type, vhcls in vehicles %}
70 <tr>
71 <th>{{ type }}</th>
72 <td>{{ vhcls | length }}</td>
73 <td>
74 {% for vehicle in vhcls %}
75 <a href="https://mpk.jacekk.net/map.html#!{{ prefix }}{{ vehicle.trip | e }}" class="low{{ vehicle.low | default }}">
76 {{ vehicle.num | default('<?>') | e }}
77 </a>
78 {% endfor %}
79 </td>
80 </tr>
81 {% endfor %}
82 </table>
c077c7 83
413654 84 <table>
JK 85 <caption>Vehicles in TTSS</caption>
86 <thead>
87 <tr>
88 <th>Vehicle</th> <th>Line</th> <th>Last seen</th>
89 </tr>
90 </thead>
91 {% for map in mapping %}
92 <tr>
93 <td>
3d1e54 94 <a href="https://mpk.jacekk.net/map.html#!{{ map.vehicle.num }}" class="low{{ map.vehicle.low | default }}">
JK 95 {{ map.vehicle.num | e }}
96 </a>
413654 97 </td>
JK 98 <td>
99 {{ map.line | default('?') | e }}
100 </td>
101 <td>
102 {{ map.date | time_diff | default('now') }}
103 </td>
104 </tr>
105 {% endfor %}
106 </table>
107
a3d091 108 Generated at {{ "now" | date("Y-m-d H:i:s P") }}
JK 109
c077c7 110 </table>