templates/trip.html

changeset 55
0f1d046b3f78
parent 53
1c934953c3e6
child 90
36efdea68d03
equal deleted inserted replaced
54:0b1e263674e8 55:0f1d046b3f78
21 { 21 {
22 font-weight: bold; 22 font-weight: bold;
23 } 23 }
24 .nested-schedule td 24 .nested-schedule td
25 { 25 {
26 background: rgba(0, 0, 0, 0.25)
27 }
28 .nested-schedule td
29 {
26 margin-left: 0; 30 margin-left: 0;
27 margin-right: 0; 31 margin-right: 0;
28 padding-left: 5px; 32 padding-left: 5px;
29 padding-right: 5px; 33 padding-right: 5px;
30 } 34 }
36 40
37 .sarake-matkapituus 41 .sarake-matkapituus
38 { 42 {
39 text-align: right; 43 text-align: right;
40 } 44 }
41
42 .aikataulu
43 {
44 margin-top: 30pt;
45 }
46 </style> 45 </style>
47 <script> 46 <script>
48 function toggle_fold(id) 47 function toggle_fold(id)
49 { 48 {
50 element = document.getElementById(id); 49 element = document.getElementById(id);
55 } 54 }
56 </script> 55 </script>
57 <title>{{route}} {{description}}</title> 56 <title>{{route}} {{description}}</title>
58 </head> 57 </head>
59 <body> 58 <body>
60 <h1>
61 {% if night %}
62 &#127769;&nbsp;
63 {% endif %}
64 🚍 {{route}} {{description}}</h1>
65 <table class='aikataulu' cellspacing='0'> 59 <table class='aikataulu' cellspacing='0'>
60 <thead>
61 <tr>
62 <th class='primary-heading' colspan='3'>
63 <span class='primary-heading-symbols'>
64 {% if night %}
65 &#127769;&nbsp;
66 {% endif %}
67 🚍
68 </span>
69 <span>{{route}} {{description}}</span>
70 </th>
71 </tr>
66 <tr> 72 <tr>
67 <th class='sarake-aika'>Aika</th> 73 <th class='sarake-aika'>Aika</th>
68 <th class='sarake-alue'>Alue</th> 74 <th class='sarake-alue'>Alue</th>
69 <th class='sarake-matkapituus'>{{'%.1f' % length}}km</th> 75 <th class='sarake-matkapituus'>{{'%.1f' % length}}km</th>
70 </tr> 76 </tr>
77 </thead>
78 <tbody>
71 {% for entry in schedule %} 79 {% for entry in schedule %}
72 <tr> 80 <tr>
73 <td class='sarake-aika' style='vertical-align: top'>{{entry['time']}}</td> 81 <td class='sarake-aika' style='vertical-align: top'>{{entry['time']}}</td>
74 <td class='sarake-alue folded' id="region-schedule-{{entry['index']}}" colspan='2'> 82 <td class='sarake-alue folded' id="region-schedule-{{entry['index']}}" colspan='2'>
75 <a class="region-name" href="javascript:toggle_fold('region-schedule-{{entry['index']}}')">{{entry['name']}}</a> 83 <a class="region-name" href="javascript:toggle_fold('region-schedule-{{entry['index']}}')">{{entry['name']}}</a>
83 {% endfor %} 91 {% endfor %}
84 </table> 92 </table>
85 </td> 93 </td>
86 </tr> 94 </tr>
87 {% endfor %} 95 {% endfor %}
96 </tbody>
88 </table> 97 </table>
89 </body> 98 </body>
90 </html> 99 </html>

mercurial