-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
73 lines (73 loc) · 3.41 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
<!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>WAFS // Week 2</title>
<link rel="stylesheet" href="./static/styles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.6/handlebars.min.js" charset="utf-8" defer></script>
<script src="./static/aja/aja.min.js" charset="utf-8" defer></script>
<script src="./static/app.js" charset="utf-8" defer></script>
</head>
<body>
<main>
<nav>
<h1>Weather api</h1>
<a href="#current">current</a>
<a href="#hourly">hourly</a>
</nav>
<section id="current"></section>
<section id="hourly">
<div class="filter-station">
<label class="label"><input type="checkbox" name="Clear"><img src="https://icons.wxug.com/i/c/v4/clear.svg" alt="Clear"></label>
<label class="label"><input type="checkbox" name="Overcast"><img src="https://icons.wxug.com/i/c/v4/cloudy.svg" alt="Overcast"></label>
<label class="label"><input type="checkbox" name="Partly Cloudy"><img src="https://icons.wxug.com/i/c/v4/mostlysunny.svg" alt="Partly Cloudy"></label>
<label class="label"><input type="checkbox" name="Fog"><img src="https://icons.wxug.com/i/c/v4/hazy.svg" alt="Fog"></label>
<label class="label"><input type="checkbox" name="Chance of Rain"><img src="https://icons.wxug.com/i/c/v4/chancerain.svg" alt="Chance of Rain"></label>
<label class="label"><input type="checkbox" name="Rain"><img src="https://icons.wxug.com/i/c/v4/rain.svg" alt="Rain"></label>
<label class="label"><input type="checkbox" name="Snow"><img src="https://icons.wxug.com/i/c/v4/snow.svg" alt="Snow"></label>
<label class="label"><input type="checkbox" name="Tstorm"><img src="https://icons.wxug.com/i/c/v4/tstorms.svg" alt="Tstorm"></label>
</div>
<section class="hourly-container"></section>
</section>
<!-- Handlebars script template -->
<script id="template-current" type="text/x-handlebars-template">
<article class="current-data">
<dl>
<dt>Temprature</dt>
<dd>{{current.temp_c}}<sup>˚C</sup></dd>
</dl>
<dl>
<dt>Location</dt>
<dd>{{current.observation_location.city}}, {{current.observation_location.country}}</dd>
<dt>Time</dt>
<dd>{{timestamp}}</dd>
<dt>Date</dt>
<dd>{{datestamp}}</dd>
</dl>
<dl>
<dt>Wind speed</dt>
<dd><img src="./static/img/plane.svg" alt="wind-icon"><em>{{current.wind_kph}}km/h</em></dd>
<dt>Humidity</dt>
<dd><img src="./static/img/drop-silhouette.svg" alt="humidity-icon"><em>{{current.relative_humidity}}</em></dd>
<dt>Condition</dt>
<dd><img src="{{current.icon_url}}" alt="{{current.icon}}"></dd>
</dl>
</article>
</script>
<script id="template-hourly" type="text/x-handlebars-template">
<article class="hourly-data">
<h1><time>{{FCTTIME.pretty}}</time></h1>
<ul>
<li>Condition: {{condition}}</li>
<li>Temprature: {{temp.metric}}<sup>˚C</sup></li>
<li>Feels like: {{feelslike.metric}}<sup>˚C</sup></li>
<li>Wind speed: {{wspd.metric}}km/h</li>
</ul>
<img src="{{icon_url}}" alt="weather condition {{icon}}">
</article>
</script>
</main>
</body>
</html>