kindle-weather/template.html
template.htmlRaw
1<!DOCTYPE html>
2<html>
3 <head>
4 <meta charset="utf-8">
5 <meta http-equiv="refresh" content="3600" />
6 <link href="/icons/weather-icons.css" rel="stylesheet" type="text/css">
7 <style>
8 body {
9 font-size: 170%;
10 }
11 h4 {
12 margin: 0%;
13 }
14 .row {
15 }
16 .column {
17 display:inline-block;
18 padding: 10px;
19 }
20 .wi {
21 font-size: 200%;
22 }
23 </style>
24 </head>
25 <body>
26 <div class="row">
27 <div class="column" style="border:1px solid;border-radius:5px;width:30;">
28 <h4>{{.Current.DateUnix}}</h4>
29 <div style="margin-top:10px; margin-bottom:10px;">
30 <!-- <i style="margin:10px;float:left;" class="wi wi-owm-{{(index .Current.Weather 0).Id}}"></i> -->
31 <!-- {{.Current.Temp}}°C, {{.Current.Humidity}}% -->
32 {{range $i, $e := .Daily}}{{if lt $i 1}}
33 <i style="margin:10px;float:left;" class="wi wi-owm-{{(index .Weather 0).Id}}"></i>
34 {{.Temp.Day}}°C, {{.Humidity}}%
35 <br>{{.Temp.Min}}/{{.Temp.Max}} °C
36 </div>
37 {{(index .Weather 0).Main}}
38 {{end}}{{end}}
39 <!-- {{(index .Current.Weather 0).Main}} -->
40 <br><i class="wi wi-sunrise" style="font-size:90%"></i> {{.Current.Sunrise}}
41 <br><i class="wi wi-sunset" style="font-size:90%"></i> {{.Current.Sunset}}
42 </div>
43
44 {{range $i, $e := .Daily}}{{if lt $i 6}}{{if gt $i 0}}
45 <div class="column" style="width:10%;">
46 <i class="wi wi-owm-{{(index .Weather 0).Id}}"></i>
47 <h4>{{.DateUnix}}</h4>
48 {{.Temp.Min}}/{{.Temp.Max}} °C
49 <!-- <p>{{(index .Weather 0).Main}}, {{(index .Weather 0).Description}}</p> -->
50 </div>
51 {{end}}{{end}}{{end}}
52 </div>
53 <br>
54 <div class="row">
55 {{range $i, $e := .Hourly}}{{if lt $i 9}}
56 <div class="column" style="font-size:90%;">
57 <i class="wi wi-owm-{{(index .Weather 0).Id}}"></i>
58 <h4>{{.DateUnix}}</h4>
59 {{.Temp}}°C
60 </div>
61 {{end}}{{end}}
62 </div>
63 <span style="float:right;font-size:70%;">
64 {{.Date}}
65 </span>
66
67 <p>
68 </p>
69 </body>
70</html>