templates/trip.html

changeset 53
1c934953c3e6
parent 48
428cfdf64ccc
child 55
0f1d046b3f78
equal deleted inserted replaced
52:cab8d38fe5c6 53:1c934953c3e6
31 .nested-schedule 31 .nested-schedule
32 { 32 {
33 border-radius: 10px; 33 border-radius: 10px;
34 margin-top: 10px; 34 margin-top: 10px;
35 } 35 }
36
37 .sarake-matkapituus
38 {
39 text-align: right;
40 }
41
42 .aikataulu
43 {
44 margin-top: 30pt;
45 }
36 </style> 46 </style>
37 <script> 47 <script>
38 function toggle_fold(id) 48 function toggle_fold(id)
39 { 49 {
40 element = document.getElementById(id); 50 element = document.getElementById(id);
50 <h1> 60 <h1>
51 {% if night %} 61 {% if night %}
52 &#127769;&nbsp; 62 &#127769;&nbsp;
53 {% endif %} 63 {% endif %}
54 🚍 {{route}} {{description}}</h1> 64 🚍 {{route}} {{description}}</h1>
55 <p style="text-align: center">Ajomatka: {{'%.1f' % length}}km</p>
56 <table class='aikataulu' cellspacing='0'> 65 <table class='aikataulu' cellspacing='0'>
57 <tr> 66 <tr>
58 <th class='sarake-aika'>Aika</th> 67 <th class='sarake-aika'>Aika</th>
59 <th class='sarake-alue'>Alue</th> 68 <th class='sarake-alue'>Alue</th>
69 <th class='sarake-matkapituus'>{{'%.1f' % length}}km</th>
60 </tr> 70 </tr>
61 {% for entry in schedule %} 71 {% for entry in schedule %}
62 <tr> 72 <tr>
63 <td class='sarake-aika' style='vertical-align: top'>{{entry['time']}}</td> 73 <td class='sarake-aika' style='vertical-align: top'>{{entry['time']}}</td>
64 <td class='sarake-alue folded' id="region-schedule-{{entry['index']}}"> 74 <td class='sarake-alue folded' id="region-schedule-{{entry['index']}}" colspan='2'>
65 <a class="region-name" href="javascript:toggle_fold('region-schedule-{{entry['index']}}')">{{entry['name']}}</a> 75 <a class="region-name" href="javascript:toggle_fold('region-schedule-{{entry['index']}}')">{{entry['name']}}</a>
66 <table class="nested-schedule" cellspacing="0"> 76 <table class="nested-schedule" cellspacing="0">
67 {% for halt in entry['stops'] %} 77 {% for halt in entry['stops'] %}
68 <tr> 78 <tr>
69 <td>{{halt['time']}}</td> 79 <td>{{halt['time']}}</td>

mercurial