Tue, 20 Jun 2017 09:39:42 +0300
optimointia
0 | 1 | <html> |
2 | <head> | |
11
e18ad36fbbf5
Lisätty favicon, korjattu tr()-funktio joka ei olettunut suomen kieleen (vaan kääntämättömään)
Teemu Piippo <teemu@hecknology.net>
parents:
4
diff
changeset
|
3 | <link rel="icon" type="image/png" href="/static/favicon.png" /> |
21 | 4 | <link rel="stylesheet" type="text/css" href="/static/style.css" /> |
0 | 5 | <meta charset='UTF-8' /> |
6 | <style> | |
22 | 7 | .sarake-pysäkki, .sarake-pysäkkiviite, .sarake-alue |
21 | 8 | { |
9 | text-align: left; | |
10 | } | |
0 | 11 | td, th, body |
12 | { | |
13 | font-size: 24pt; | |
22 | 14 | }/* |
15 | body | |
16 | { | |
17 | background: url('/static/tausta-bussi.png') no-repeat center center fixed; | |
18 | background-size: cover; | |
19 | }*/ | |
20 | </style> | |
21 | <script> | |
22 | function openTab(event, category) | |
0 | 23 | { |
22 | 24 | var tabcontent = document.getElementsByClassName("tab"); |
25 | for (var i = 0; i < tabcontent.length; i++) | |
26 | tabcontent[i].style.display = "none"; | |
27 | ||
28 | var tablinks = document.getElementsByClassName("tab-button"); | |
29 | for (var i = 0; i < tablinks.length; i++) | |
30 | tablinks[i].className = tablinks[i].className.replace(" active", ""); | |
31 | ||
32 | document.getElementById(category).style.display = "block"; | |
33 | event.currentTarget.className += " active"; | |
34 | window.scrollTo(0, 0); | |
35 | } | |
36 | </script> | |
4 | 37 | <title>{{linja}} {{selite}}</title> |
0 | 38 | </head> |
39 | <body> | |
4 | 40 | <h1> |
41 | {% if yö %} | |
42 | 🌙 | |
43 | {% endif %} | |
22 | 44 | {{linja}} {{selite}}</h1> |
45 | <nav> | |
46 | <div class="tab-bar"> | |
47 | <span></span> | |
48 | <button class="tab-button active" onclick="openTab(event, 'tab-overview')">Reitti</button> | |
49 | <button class="tab-button" onclick="openTab(event, 'tab-stops')">Pysäkit</button> | |
50 | <span></span> | |
51 | </div> | |
52 | </nav> | |
53 | <center>Ajomatka: {{'%.1f' % length}}km</center> | |
54 | <div id="tab-overview" class="tab"> | |
55 | <table class='aikataulu' cellspacing='0'> | |
56 | <tr> | |
57 | <th class='sarake-aika'>Aika</th> | |
58 | <th class='sarake-alue'>Alue</th> | |
59 | </tr> | |
60 | {% for rivi in suppea_reitti %} | |
61 | <tr> | |
62 | <td class='sarake-aika'>{{rivi['aika']}}</td> | |
63 | <td class='sarake-alue'>{{rivi['alue']}}</td> | |
64 | </tr> | |
65 | {% endfor %} | |
66 | </table> | |
67 | </div> | |
68 | <div id="tab-stops" class="tab" style="display: none"> | |
69 | <table class='aikataulu' cellspacing='0'> | |
70 | <tr> | |
71 | <th class='sarake-aika'>Aika</th> | |
72 | <th class='sarake-pysäkkiviite'>Pysäkki</th> | |
73 | <th class='sarake-pysäkki'>Nimi</th> | |
74 | </tr> | |
75 | {% for rivi in reitti %} | |
76 | <tr> | |
77 | <td class='sarake-aika'>{{rivi['aika']}}</td> | |
78 | <td class='sarake-pysäkkiviite'> | |
79 | <a href="/pysäkki/{{rivi['tunniste']}}"><img src='/static/pysäkki.png' height='24' /> {{rivi['tunniste']}}</a> | |
80 | </td> | |
81 | <td class='sarake-pysäkki'> | |
82 | <a href="/pysäkki/{{rivi['tunniste']}}">{{rivi['nimi']}}</a> | |
83 | </td> | |
84 | </tr> | |
85 | {% endfor %} | |
86 | </table> | |
87 | </div> | |
0 | 88 | </body> |
4 | 89 | </html> |