-
Notifications
You must be signed in to change notification settings - Fork 39
/
config.html
213 lines (209 loc) · 8.59 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!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 - auto by city or location</option>
<option value="local">local - reported by kindle/browser</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>
<option value="+13:00">+13 h</option>
<option value="-13:00">-13 h</option>
</select>
</label>
</div>
<div>
<label>Language: <br/>
<select name="lang" id="lang">
<!-- a;b (a == owm lang, b = moment locale (if different))-->
<option value="sk">Slovak (sk)</option>
<option value="en">English (en)</option>
<option value="af">Afrikaans (af)</option>
<option value="al;sq">Albanian (al/sq)</option>
<option value="ar">Arabic (ar)</option>
<option value="az">Azerbaijani (az)</option>
<option value="bg">Bulgarian (bg)</option>
<option value="ca">Catalan (ca)</option>
<option value="cz;cs">Czech (cz/cs)</option>
<option value="da">Danish (da)</option>
<option value="de">German (de)</option>
<option value="el">Greek (el)</option>
<option value="eu">Basque (eu)</option>
<option value="fa">Persian (Farsi) (fa)</option>
<option value="fi">Finnish (fi)</option>
<option value="fr">French (fr)</option>
<option value="gl">Galician (gl)</option>
<option value="he">Hebrew (he)</option>
<option value="hi">Hindi (hi)</option>
<option value="hr">Croatian (hr)</option>
<option value="hu">Hungarian (hu)</option>
<option value="id">Indonesian (id)</option>
<option value="it">Italian (it)</option>
<option value="ja">Japanese (ja)</option>
<option value="kr;ko">Korean (kr/ko)</option>
<option value="la">Latvian (la)</option>
<option value="lt">Lithuanian (lt)</option>
<option value="mk">Macedonian (mk)</option>
<option value="no;nb">Norwegian (no)</option>
<option value="nl">Dutch (nl)</option>
<option value="pl">Polish (pl)</option>
<option value="pt">Portuguese (pt)</option>
<option value="pt_br">Português Brasil (pt_br)</option>
<option value="ro">Romanian (ro)</option>
<option value="ru">Russian (ru)</option>
<option value="sv">Swedish (sv)</option>
<option value="sl">Slovenian (sl)</option>
<option value="es">Spanish (es)</option>
<option value="sr">Serbian (sr)</option>
<option value="th">Thai (th)</option>
<option value="tr">Turkish (tr)</option>
<option value="uk">Ukrainian (uk)</option>
<option value="vi">Vietnamese (vi)</option>
<option value="zh_cn">Chinese Simplified (zh_cn)</option>
<option value="zh_tw">Chinese Traditional (zh_tw)</option>
<option value="zu">Zulu (zu)</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>Show: <br/>
<select name="tempType" id="tempType">
<option value="actual">Actual temperature</option>
<option value="feelsLike">Feels like temperature</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"];
}
if (params["tempType"]) {
document.getElementById("tempType").value = params["tempType"];
}
</script>
</body>
</html>