arnaucube
arnaucube/kindle-weatherPublic Self-hosted repository
kindle-weather/template.html
template.htmlRaw
 1<!DOCTYPE html>
 2<html>
 3	<head>
 4		<meta charset="utf-8">
 5		<meta http-equiv="refresh" content="600" />
 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					<br>{{.Temp.Min}}/{{.Temp.Max}} °C
34				</div>
35				{{(index .Weather 0).Main}}, {{(index .Weather 0).Description}}
36				{{end}}{{end}}
37				<br>{{.Current.Sunrise}}
38				<br>{{.Current.Sunset}}
39			</div>
40
41			{{range $i, $e := .Daily}}{{if lt $i 6}}{{if gt $i 0}}
42			<div class="column" style="width:10%;">
43				<i class="wi wi-owm-{{(index .Weather 0).Id}}"></i>
44				<h4>{{.DateUnix}}</h4>
45				{{.Temp.Min}}/{{.Temp.Max}} °C
46				<!-- <p>{{(index .Weather 0).Main}}, {{(index .Weather 0).Description}}</p> -->
47			</div>
48			{{end}}{{end}}{{end}}
49		</div>
50		<br>
51		<div class="row">
52			{{range $i, $e := .Hourly}}{{if lt $i 7}}
53			<div class="column" style="width:10%;">
54				<i class="wi wi-owm-{{(index .Weather 0).Id}}"></i>
55				<h4>{{.DateUnix}}</h4>
56				{{.Temp}}°C, {{.Humidity}}%
57			</div>
58			{{end}}{{end}}
59		</div>
60		<span style="float:right;font-size:70%;">
61			{{.Date}}
62		</span>
63
64		<p>
65		</p>
66	</body>
67</html>