-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
298 lines (274 loc) · 11.9 KB
/
index.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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<!DOCTYPE html>
<html id="html" lang="zh" class="has-navbar-fixed-top">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=1.0" />
<title>alsoweather</title>
<link rel="shortcut icon" type="image/jpg" href="icon/icon.png" />
<!-- css -->
<link rel="stylesheet" href="css/bulma.min.css" />
<!-- <link rel="stylesheet" href="css/glowCookies.css" /> -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" />
<link rel="manifest" href="manifest.json" />
<meta name="theme-color" content="#effaf5" />
<link rel="apple-touch-icon" href="icon/icon.png" />
<link rel="stylesheet" href="css/style.css" />
<script src="js/chart.min.js"></script>
<!-- shepherd -->
<script src="https://cdn.jsdelivr.net/npm/shepherd.js@10.0.1/dist/js/shepherd.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/shepherd.js@10.0.1/dist/css/shepherd.css" />
</head>
<body>
<!-- nav bar -->
<nav class="navbar has-background-success-light is-fixed-top" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="">
<h5 class="title is-5">alsoweather</h5>
</a>
</div>
</nav>
<!-- main content -->
<div class="container mt-3 px-3" style="max-width: 600px">
<h2 class="title is-2" data-fillin-text="cwb_location_select_value">...</h2>
<!-- weather info -->
<div class="card has-background-success-light mt-3 mb-3">
<div class="card-content" id="step1">
<div class="content" id="weather_block_inner_content">
<div id="loading_weather_skeleton">
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
</div>
</div>
<!-- what to wear -->
<h5 class="title is-5 has-text-grey has-text-weight-light" id="whatToWear"></h5>
</div>
</div>
<!-- refresh button -->
<!-- <button
id="refresh_button"
class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3"
onclick="refresh_all()"
>
<span class="icon is-small">
<i class="fas fa-sync"></i>
</span>
<span class="ml-3" data-i18n-key="refresh">Refresh</span>
</button> -->
<div id="refresh_div"></div>
<!-- week forecast -->
<button
id="week_forecast_button"
class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3"
onclick="goToWeekForecast()"
>
<span class="icon is-small">
<i class="fab fa-weebly"></i>
</span>
<span class="ml-3" data-i18n-key="week_forecast">一周天氣</span>
</button>
<!-- SpeechSynthesis button -->
<div id="speechSynthesis_container"></div>
<!-- radar -->
<button
class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3"
id="radar_button"
onclick="openRadarModal()"
>
<span class="icon is-small">
<i class="fas fa-cloud"></i>
</span>
<span class="ml-3" data-i18n-key="radar">雷達回波</span>
</button>
<div class="modal" id="radar_iframe_modal" data-modal-name="radar">
<div class="modal-background" onclick="close_modal(this)" data-modal-to-close="radar"></div>
<div class="modal-card" style="min-height: 99%">
<header class="modal-card-head">
<p class="modal-card-title" data-i18n-key="radar">雷達回波</p>
<button class="delete" aria-label="close" onclick="close_modal(this)" data-modal-to-close="radar"></button>
</header>
<section class="modal-card-body" style="padding: 0">
<iframe id="radar_iframe" style="width: 100%; height: 98%" src="" title="雷達回波"></iframe>
</section>
<footer class="modal-card-foot">
<!-- <button class="button is-success">Save changes</button> -->
<button class="button" onclick="close_modal(this)" data-modal-to-close="radar" data-i18n-key="close">
Close
</button>
</footer>
</div>
</div>
<!-- weather chart -->
<div class="card has-background-success-light mt-3 mb-3">
<div class="card-content" id="step2">
<div class="content" id="weather_chart_inner_content">
<canvas id="weather_chart_canvas" width="400" height="320"></canvas>
</div>
</div>
</div>
<!-- some quote -->
<div class="card has-background-success-light mt-3 mb-3">
<div class="card-header">
<span class="card-header-icon">
<i class="fas fa-angle-double-right"></i>
</span>
<span class="card-header-title" data-i18n-key="quote">佳句</span>
</div>
<div class="card-content">
<div class="content" id="quote_block_inner_content">
<div id="loading_quote_skeleton">
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
<div class="skeleton skeleton-text"></div>
</div>
</div>
</div>
</div>
<div>
<!-- open config button -->
<button
class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3"
onclick="open_modal(this)"
data-modal-to-open="config"
id="configButton"
>
<span class="icon is-small">
<i class="fas fa-cog"></i>
</span>
<span data-i18n-key="config" class="ml-3">設定</span>
</button>
</div>
</div>
<!-- modal -->
<!-- config modal -->
<div data-modal-name="config" class="modal">
<div class="modal-background" onclick="close_modal(this)" data-modal-to-close="config"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title" data-i18n-key="config">設定</p>
<button class="delete" aria-label="close" onclick="close_modal(this)" data-modal-to-close="config"></button>
</header>
<section class="modal-card-body">
<!-- location -->
<div class="control has-icons-left mt-3 mb-3">
<div class="select is-large is-fullwidth">
<select id="cwb_location_select">
<option value="" data-i18n-key="choose-location" disabled selected>choose location</option>
</select>
</div>
<div class="icon is-large is-left">
<i class="fas fa-map-marker-alt"></i>
</div>
</div>
<!-- SpeechSynthesis config -->
<div id="speechSynthesis_config_container"></div>
<!-- lang -->
<div class="control has-icons-left mt-3 mb-3">
<div class="select is-large is-fullwidth">
<select id="lang_select">
<option value="en">en</option>
<option value="zh-TW">zh-TW</option>
</select>
</div>
<div class="icon is-large is-left">
<i class="fas fa-language"></i>
</div>
</div>
<button onclick="toggle_darkmode()" class="button is-large is-info is-outlined is-fullwidth mt-3 mb-3">
<span class="icon is-small">
<i class="fas fa-adjust"></i>
</span>
<span data-i18n-key="toggle-darkmode" class="ml-3">toggle-darkmode</span>
</button>
<hr />
<!-- <button onclick="reinstall_pwa()" class="button is-large is-danger is-outlined is-fullwidth mt-3 mb-3">
<span class="icon is-small">
<i class="fas fa-times-circle"></i>
</span>
<span data-i18n-key="reinstall-pwa" class="ml-3">reinstall-pwa</span>
</button>
<span>You can reinstall service worker and remove caches when facing problems by clicking this button.</span>
<hr /> -->
<button onclick="see_tour_again()" class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3">
<span class="icon is-small">
<i class="fas fa-question-circle"></i>
</span>
<span data-i18n-key="see-tour" class="ml-3">See tour</span>
</button>
<a
class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3"
href="https://sk5s.cyou/alsoweather/docs/#/guide/install-pwa"
target="_blank"
id="installPwa"
>
<span class="icon is-small">
<i class="fas fa-question-circle"></i>
</span>
<span data-i18n-key="how-install-pwa" class="ml-3">install-pwa</span>
</a>
<a
class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3"
href="https://git.io/alsoweather"
target="_blank"
>
<span class="icon is-small">
<i class="fab fa-github"></i>
</span>
<span class="ml-3">Github</span>
</a>
<button
onclick="alert_modal(`<h1 class='title is-1 mb-3'>About alsoweather</h1>簡易天氣app,有mobile、desktop版本。最大溫度折線圖、最小溫度折線圖、地區記憶,chart.js,改善時間顯示<br><a class='button is-large is-success' href='https:\/\/sk5s.cyou/alsoweather/docs/' target='_blank'><i class='fas fa-external-link-square-alt'></i> docs</a>`, )"
class="button is-large is-success is-outlined is-fullwidth mt-3 mb-3"
>
<span class="icon is-small">
<i class="fas fa-info-circle"></i>
</span>
<span data-i18n-key="about" class="ml-3">about</span>
</button>
</section>
<footer class="modal-card-foot">
<button class="button" onclick="close_modal(this)" data-modal-to-close="config" data-i18n-key="close">
Close
</button>
</footer>
</div>
</div>
<!-- prompt modal container -->
<div data-modal-name="prompt" class="modal">
<div class="modal-background" onclick="close_modal(this)" data-modal-to-close="prompt"></div>
<div class="modal-card">
<section class="modal-card-body" id="prompt_modal_container"></section>
</div>
</div>
<!-- footer -->
<div class="pt-6"></div>
<footer class="navbar has-background-success-light" id="footer">
<div style="text-align: center; width: 100%">sk5s project</div>
</footer>
<script src="js/key.js"></script>
<script id="i18next_script" src="https://cdn.jsdelivr.net/npm/i18next@21.6.11/i18next.min.js"></script>
<script src="js/i18n.js"></script>
<script src="js/my-chart.js"></script>
<script src="js/darkmode-js.min.js"></script>
<!-- <script src="js/glowCookies.js"></script> -->
<script src="js/app.js"></script>
<script src="./capacitor.js"></script>
<script src="./ad.js"></script>
<!-- <script>
glowCookies.start('en', {
style: 1,
position: 'right',
hideAfterClick: true,
manageText: ' ',
hotjar: 2745355,
})
</script> -->
</body>
</html>