templates/trip.html

changeset 117
e7174afc6121
parent 116
5b6652cd4954
child 118
24f5faf6237f
equal deleted inserted replaced
116:5b6652cd4954 117:e7174afc6121
57 { 57 {
58 padding: 2px; 58 padding: 2px;
59 border: 1px solid #888; 59 border: 1px solid #888;
60 background-color: #e0e0e0; 60 background-color: #e0e0e0;
61 border-radius: 3px; 61 border-radius: 3px;
62 }
63 .popup
64 {
65 font-size: 16pt;
62 } 66 }
63 #mapid { height: 50vh; } 67 #mapid { height: 50vh; }
64 </style> 68 </style>
65 <script> 69 <script>
66 function toggle_fold(id) 70 function toggle_fold(id)
190 fillColor: 'yellow', 194 fillColor: 'yellow',
191 fillOpacity: 1, 195 fillOpacity: 1,
192 title: "{{halt['ref']}} {{halt['name']}}", 196 title: "{{halt['ref']}} {{halt['name']}}",
193 _my_bus_stop_url: "/stop/{{halt['ref']}}", 197 _my_bus_stop_url: "/stop/{{halt['ref']}}",
194 }).addTo(mymap); 198 }).addTo(mymap);
195 popupmsg = "<h3><a href='/stop/{{halt['ref']}}'><span class='bus_stop_ref'>{{halt['ref']}}</span> {{halt['name']}}</a></h3>"; 199 popupmsg = "<span class='popup'><h3><a href='/stop/{{halt['ref']}}'><span class='bus_stop_ref'>{{halt['ref']}}</span> {{halt['name']}}</a></h3>";
196 200
197 {% if halt['arrival_time'] != halt['departure_time'] %} 201 {% if halt['arrival_time'] != halt['departure_time'] %}
198 popupmsg += "<p><ul><li>Saapuu: {{halt['arrival_time']}}</li><li>Lähtee: {{halt['departure_time']}}</li></ul></p>"; 202 popupmsg += "<p><ul><li>Saapuu: {{halt['arrival_time']}}</li><li>Lähtee: {{halt['departure_time']}}</li></ul></p></span>";
199 {% else %} 203 {% else %}
200 popupmsg += "<p><ul><li>Pysähtyy: {{halt['arrival_time']}}</li></ul></p>"; 204 popupmsg += "<p><ul><li>Pysähtyy: {{halt['arrival_time']}}</li></ul></p></span>";
201 {% endif %} 205 {% endif %}
202 marker.bindPopup(popupmsg); 206 marker.bindPopup(popupmsg);
203 {% endfor %} 207 {% endfor %}
204 {% endfor %} 208 {% endfor %}
205 </script> 209 </script>

mercurial