forked from matopeto/kindle-weather-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.html
156 lines (152 loc) · 5.48 KB
/
config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kindle Weather Dashboard Config</title>
<style>
h1 {
text-align: center;
}
body {
margin: 10px;
}
form div {
margin: 10px 0;
}
input[name=city] {
width: 90%;
padding: 10px;
}
input[name=lat], input[name=lon] {
width: 100px;
}
</style>
</head>
<body>
<h1>Kindle Weather Dashboard<br/>Config Page</h1>
<form action="index.html">
<div>
<label>City: <br/><input type="text" name="city" id="city" /></label>
</div>
<div>Or GPS:</div>
<div>
<label>Lat (e.g. 50.123): <input type="text" name="lat" id="lat" /></label>
<label>Lon (e.g. 14.4): <input type="text" name="lon" id="lon" /></label>
</div>
<div>
<label>UTC offset: (kindle paperwhite (and maybe some others) doesn't report correct local time to the kindle (always it is GMT/UTC). If times on dashboard are bad, you can set custom offset, like 1, 2, -3 etc. You may need to set it again after winter/summer time change.)<br/>
<select name="utcOffset" id="utcOffset">
<option value="">default</option>
<option value="+01:00">+1 h</option>
<option value="-01:00">-1 h</option>
<option value="+02:00">+2 h</option>
<option value="-02:00">-2 h</option>
<option value="+03:00">+3 h</option>
<option value="-03:00">-3 h</option>
<option value="+04:00">+4 h</option>
<option value="-04:00">-4 h</option>
<option value="+05:00">+5 h</option>
<option value="-05:00">-5 h</option>
<option value="+06:00">+6 h</option>
<option value="-06:00">-6 h</option>
<option value="+07:00">+7 h</option>
<option value="-07:00">-7 h</option>
<option value="+08:00">+8 h</option>
<option value="-08:00">-8 h</option>
<option value="+09:00">+9 h</option>
<option value="-09:00">-9 h</option>
<option value="+10:00">+10 h</option>
<option value="-10:00">-10 h</option>
<option value="+11:00">+11 h</option>
<option value="-11:00">-11 h</option>
<option value="+12:00">+12 h</option>
<option value="-12:00">-12 h</option>
</select>
</label>
</div>
<div>
<label>Language: <br/>
<select name="lang" id="lang">
<option value="sk">Slovensky</option>
<option value="en">English</option>
<option value="cs">Česky</option>
<option value="de">Deutsch</option>
<option value="ru">Russian</option>
</select>
</label>
</div>
<div>
<label>Rotation: <br/>
<select name="rotation" id="rotation">
<option value="none">None</option>
<option value="ll">Landscape Left</option>
<option value="lr">Landscape right</option>
<option value="up">Upside down</option>
<option value="">default</option>
</select>
</label>
</div>
<div>
<label>Units: <br/>
<select name="units" id="units">
<option value="metric">Metric - °C</option>
<option value="imperial">Imperial - Fahrenheit</option>
<option value="">default</option>
</select>
</label>
</div>
<div>
<label>Night Mode: <br/>
<select name="night" id="night">
<option value="off">off</option>
<option value="auto">sunset - sunrise</option>
<option value="on">always</option>
<option value="">default</option>
</select>
</label>
</div>
<div>
<label>OWM appid (leave it blank for default): <br/><input type="text" name="appId" id="appId"/></label>
</div>
<div>
<input type="submit" value="Show Dashboard"/>
</div>
</form>
<div>Source ane more info: <a href="https://github.com/matopeto/kindle-weather-dashboard">https://github.com/matopeto/kindle-weather-dashboard</a></div>
<script type="application/javascript">
var params={};
window.location.search
.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(str,key,value) {
params[key] = decodeURIComponent(value);
}
);
if (params["city"]) {
document.getElementById("city").value = params["city"];
}
if (params["lat"]) {
document.getElementById("lat").value = params["lat"];
}
if (params["lon"]) {
document.getElementById("lon").value = params["lon"];
}
if (params["lang"]) {
document.getElementById("lang").value = params["lang"];
}
if (params["rotation"]) {
document.getElementById("rotation").value = params["rotation"];
}
if (params["units"]) {
document.getElementById("units").value = params["units"];
}
if (params["night"]) {
document.getElementById("night").value = params["night"];
}
if (params["appId"]) {
document.getElementById("appId").value = params["appId"];
}
if (params["utcOffset"]) {
document.getElementById("utcOffset").value = params["utcOffset"];
}
</script>
</body>
</html>