forked from Syncano-Community/weather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (93 loc) · 3.42 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
<!DOCTYPE html>
<html>
<head>
<title>Weather App</title>
<!-- META -->
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#1976d2">
<link rel="shortcut icon" href="./img/favicon-16x16-48dc506ad6.png">
<meta name="description" content="A weather app built on Syncano.">
<meta name="keywords" content="real-time apps, real-time app, front-end code, weather, app, demo">
<!-- STYLES -->
<link rel="stylesheet" href="./css/materialize.min.css">
<link rel="stylesheet" href="./css/index.css">
<link rel="stylesheet" href="./css/weather-icons.css">
<link rel="stylesheet" href="./css/font-awesome.min.css">
</head>
<body>
<nav>
<div class="nav-wrapper">
<a href="#" class="brand-logo center">
<img src="./img/syncano-logo-white.png" class="image-responsive" alt="Syncano Logo white"> Weather App Demo
</a>
</div>
</nav>
<a id="scale" class="btn-floating btn-large waves-effect waves-light blue">°<span>F</span></a>
<div class="container">
<div class="row">
<form class="col s12">
<div class="input-field col s7">
<input id="city" type="text" class="validate" autocomplete="off"></input>
<label for="city">City</label>
</div>
<div class="input-field col s2">
<input id="state" type="text" class="validate" autocomplete="off"></input>
<label for="state">State</label>
</div>
<div class="input-field col s2" style="padding-top:5px;float:right;">
<a id="addWeather" class="waves-effect waves-light blue btn-flat">ADD</a>
</div>
</form>
</div>
<div id="empty">
Add a weather box! <i>For example: "New York", "NY"</i>
</div>
<div class="row" id="weatherBoxes"></div>
</div>
<script id="wBox-template" type="text/x-handlebars-template">
<div class="col s12 m6 l6" data-cityid={{city_id}}>
<div class="card">
<div class="card-content white-text">
<div class="row card-title">
<h3 class="col s10">{{city_name}}</h3>
<i class="col s2 right-align fa fa-times-circle-o fa-2x exit"></i>
</div>
<div class="row current center-align">
<span class="col s6 curr_temp" data-temp={{current_temp}}>{{displayTemp current_temp}}</span>
<span class="col s6 curr_cond">{{displayIcon short_description}}</span>
</div>
<div class="row">
<table class="bordered forecast">
<thead>
<tr>
<th>Forecast</th>
<th class="center-align">Condition</th>
<th class="center-align" data-field="min">Low</th>
<th class="center-align" data-field="max">High</th>
</tr>
</thead>
<tbody>
{{#each forecast}}
<tr>
<td width="40%">{{displayDay @key}}</td>
<td class="center-align">{{displayIcon short_description}}</td>
<td class="center-align" data-temp={{temp_min}}>{{displayTemp temp_min}}</td>
<td class="center-align" data-temp={{temp_max}}>{{displayTemp temp_max}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</div>
</div>
</div>
</script>
<script src="./scripts/vendor/jquery.min.js"></script>
<script src="./scripts/vendor/handlebars.js"></script>
<script src="./scripts/vendor/materialize.min.js"></script>
<script src="./scripts/vendor/syncano.min.js"></script>
<script src="./scripts/index.js"></script>
</body>
</html>