This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
297 lines (276 loc) · 11.8 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Weather</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.2/css/bulma.min.css">
<link rel="stylesheet" href="style/index.css">
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<div id="app">
<nav class="nav">
<div class="nav-left">
<a class="nav-item">
<img src="http://bulma.io/images/placeholders/256x256.png" height="200px" width="300px" alt="">
</a>
</div>
<div class="nav-center">
<a class="nav-item" href="https://www.facebook.com/weather.taiwan/" target="_blank">
<span class="icon">
<i class="fa fa-facebook-official"></i>
</span>
</a>
<a class="nav-item">
<span class="icon">
<i class="fa fa-apple"></i>
</span>
</a>
<a class="nav-item">
<span class="icon">
<i class="fa fa-android"></i>
</span>
</a>
</div>
<!-- This "nav-toggle" hamburger menu is only visible on mobile -->
<!-- You need JavaScript to toggle the "is-active" class on "nav-menu" -->
<span class="nav-toggle">
<span></span>
<span></span>
<span></span>
</span>
<div class="nav-right nav-menu">
<a class="nav-item nav-item-selected">
首頁
</a>
<a class="nav-item">
預報
</a>
<a class="nav-item">
觀測
</a>
<a class="nav-item">
天氣
</a>
<a class="nav-item">
天文
</a>
<a class="nav-item">
新聞專區
</a>
<a class="nav-item">
科普園地
</a>
</div>
</nav>
<div class="container">
<div class="columns">
<!-- Information -->
<div class="column is-5">
<!-- 您的地點 -->
<h5 class="title is-5" id="search-text">您的地點</h5>
<div class="field has-addons">
<a class="button is-primary is-small">
<span class="icon">
<i class="fa fa-search"></i>
</span>
</a>
<p class="control">
<input class="input is-small location-search" type="text" placeholder="台中市, 西屯區">
</p>
</div>
<!-- 時間 -->
<p class="time">{{ dateToday() }}</p>
<!-- 目前警特報、即時天氣訊息 -->
<div class="item">
<h4 class="title is-4">目前警特報、即時天氣訊息</h4>
<div class="warning-items">
<div class="warning-item">
<center>
<figure class="image is-48x48">
<img src="http://bulma.io/images/placeholders/64x64.png">
</figure>
</center>
<p class="warning-text">大雨特報</p>
</div>
<div class="warning-item">
<center>
<figure class="image is-48x48">
<img src="http://bulma.io/images/placeholders/64x64.png">
</figure>
</center>
<p class="warning-text">強風特報</p>
</div>
<div class="warning-item">
<center>
<figure class="image is-48x48">
<img src="http://bulma.io/images/placeholders/64x64.png">
</figure>
</center>
<p class="warning-text">低溫特報</p>
</div>
<div class="warning-item">
<center>
<figure class="image is-48x48">
<img src="http://bulma.io/images/placeholders/64x64.png">
</figure>
</center>
<p class="warning-text">XX特報</p>
</div>
<div class="warning-item">
<center>
<figure class="image is-48x48">
<img src="http://bulma.io/images/placeholders/64x64.png">
</figure>
</center>
<p class="warning-text">OO特報</p>
</div>
</div>
</div>
<!-- 氣象觀測 -->
<div class="item">
<h4 class="title is-4">氣象觀測 ({{ weatherNowTimeText }})</h4>
<div class="columns observe-items">
<div class="column is-4">
<div class="observe-temp">
<p class="main-temp">{{ weatherNow.temp }}°C</p>
<p class="body-temp">體感溫度 {{ bodyTemp }}°C</p>
</div>
</div>
<div class="column is-4" style="padding-left: 0px;padding-right: 0px;">
<div class="observe-info">
<div class="observe-wind">
<figure class="image is-48x48">
<img src="http://bulma.io/images/placeholders/48x48.png">
</figure>
<p class="wind-text">{{ weatherNow.wdir }}<br>{{ wdirEng }}</p>
</div>
<p class="wind-text">風力:{{ weatherNow.wdsd }}m/s(3級)<br>陣風:5.4m/s(3級)</p>
</div>
</div>
<div class="column" style="padding-left: 0px;padding-right: 0px;">
<div class="observe-info">
<p>
<span class="icon"><i class="fa fa-sun-o"></i></span>
{{ weatherNow.humd }}%
</p>
<p>
<span class="icon"><i class="fa fa-sun-o"></i></span>
{{ weatherNow.h_24r }}毫米
</p>
<p>
<span class="icon"><i class="fa fa-sun-o"></i></span>
低量級
</p>
</div>
</div>
</div>
</div>
<!-- 空氣品質 -->
<div class="item">
<h4 class="title is-4">空氣品質 ({{ aqiNowTimeText }})</h4>
<div class="columns air-items">
<div class="column is-one-quarter">
<div class="aqi-box">
<p class="aqi-text">AQI</p>
<p class="aqi-value">{{ aqiNow.aqi }}</p>
<p class="aqi-quality" :style="aqiValueColor">{{ aqiValueText }}</p>
</div>
</div>
<!-- TODO: refactoring to component -->
<div class="column pollution-view">
<div class="pollutant-view">
<p class="pollutant-text">指標污染物</p>
<div class="pollutant">
<p>{{ aqiNow.pollutant ? aqiNow.pollutant : '無' }}</p>
</div>
</div>
<div class="pollutions-list">
<div class="polltuion-item">
<p class="polltuion-text">PM2.5</p>
<svg height="10" width="100">
<line x1="3" y1="5" x2="95" y2="5" stroke="#ccc" stroke-linecap="round" stroke-width="5" />
<line x1="3" y1="5" :x2="aqiPercent.pm25 + 3" y2="5" :stroke="aqiBarColor(aqiPercent.pm25)" stroke-linecap="round" stroke-width="5" />
</svg>
<p class="polltuion-value">{{ aqiNow.pm25 }}μg/m3</p>
</div>
<div class="polltuion-item">
<p class="polltuion-text">SO<sub>2</sub></p>
<svg height="10" width="100">
<line x1="3" y1="5" x2="95" y2="5" stroke="#ccc" stroke-linecap="round" stroke-width="5" />
<line x1="3" y1="5" :x2="aqiPercent.so2 + 3" y2="5" :stroke="aqiBarColor(aqiPercent.so2)" stroke-linecap="round" stroke-width="5" />
</svg>
<p class="polltuion-value">{{ aqiNow.so2 }}ppb</p>
</div>
<div class="polltuion-item">
<p class="polltuion-text">NO<sub>2</sub></p>
<svg height="10" width="100">
<line x1="3" y1="5" x2="95" y2="5" stroke="#ccc" stroke-linecap="round" stroke-width="5" />
<line x1="3" y1="5" :x2="aqiPercent.no2 + 3" y2="5" :stroke="aqiBarColor(aqiPercent.no2)" stroke-linecap="round" stroke-width="5" />
</svg>
<p class="polltuion-value">{{ aqiNow.no2 }}ppb</p>
</div>
</div>
<div class="pollutions-list">
<div class="polltuion-item">
<p class="polltuion-text">PM10</p>
<svg height="10" width="100">
<line x1="3" y1="5" x2="95" y2="5" stroke="#ccc" stroke-linecap="round" stroke-width="5" />
<line x1="3" y1="5" :x2="aqiPercent.pm10 + 3" y2="5" :stroke="aqiBarColor(aqiPercent.pm10)" stroke-linecap="round" stroke-width="5" />
</svg>
<p class="polltuion-value">{{ aqiNow.pm10 }}μg/m3</p>
</div>
<div class="polltuion-item">
<p class="polltuion-text">O<sub>3</sub></p>
<svg height="10" width="100">
<line x1="3" y1="5" x2="95" y2="5" stroke="#ccc" stroke-linecap="round" stroke-width="5" />
<line x1="3" y1="5" :x2="aqiPercent.o3 + 3" y2="5" :stroke="aqiBarColor(aqiPercent.o3)" stroke-linecap="round" stroke-width="5" />
</svg>
<p class="polltuion-value">{{ aqiNow.o3 }}ppb</p>
</div>
<div class="polltuion-item">
<p class="polltuion-text">CO</p>
<svg height="10" width="100">
<line x1="3" y1="5" x2="95" y2="5" stroke="#ccc" stroke-linecap="round" stroke-width="5" />
<line x1="3" y1="5" :x2="aqiPercent.co + 3" y2="5" :stroke="aqiBarColor(aqiPercent.co)" stroke-linecap="round" stroke-width="5" />
</svg>
<p class="polltuion-value">{{ aqiNow.co }}ppm</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- News -->
<div class="column news">
<div class="columns">
<div class="column news-fig">
<figure class="image is-1x1">
<img src="http://bulma.io/images/placeholders/256x256.png">
</figure>
</div>
<div class="column news-text">
<p class="news-time">
2017年3月19日 (日) 00:15發佈
</p>
<p class="news-title">
中國境外污染源持續移入
</p>
<p class="news-content">
動在快而權下動只集、甚連被們發照漸為這好化國,裡度衣紅。決證力建爭獨下爸,心受構草學而樣馬可團技長此……倒臺事熱狀?法人球濟了輪雨痛來我於不展去寫維海國說器們們外微少父企一?
道這和,山何家主不此時也媽人住,來下跟人維生國:照了會系爸、什月化手行是,雲關是個金是。邊她鄉變、影謝接沒運西!
</p>
<a href="" type="button" class="news-readmore">閱讀更多</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="js/index.js"></script>
</body>
</html>