-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
299 lines (285 loc) · 19.2 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
299
<!DOCTYPE html>
<html lang="en">
<head>
<title>City Dashboard</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A simple dashboard of your city in material design.">
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="assets/favicon.ico" rel="icon" type="image/x-icon" />
<!-- JS -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/js/materialize.min.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCNSJjVH5xyeBcAtSzukehY2BOuvUuoz_k&libraries=places"></script>
<!-- Url from Unsplash for local development -->
<script src="js/apiData.js"></script>
<script src="js/app.js" type="text/javascript"></script>
</head>
<body>
<div class="navbar-fixed">
<!-- Per Materialize Docs-->
<nav class="cd-navbar js-cd-navbar blue" role="navigation">
<a href="./"><img src="assets/logo.png" alt="The City Dashboard logo." class="cd-logo-image" /></a>
<span class="brand-logo center white-text">
<h1>City Dashboard</h1>
</span>
<ul id="nav-mobile" class="right">
<li><a onclick="newSearch();">Change City</a></li>
</ul>
</nav>
</div>
<div class="container cd-main-content">
<section>
<div class="row">
<div class="col s12 cd-main-header js-cd-main-header white-text">
<h2>Welcome to your City Dashboard!</h2>
<div class="col s12 m8 l8 xl8 offset-m2 offset-l2 offset-xl2 js-cd-info-panel">
<div class="card-panel grey darken-4 z-depth-4">
<p>I can give you some useful information about your current city or any city in the world!</p>
<p>If you want to get information about your current city, I'll need to know your location.
<br>Click the `Use My Location` button to see the location request dialog.
<br>Click Allow to use your location.
<br>Otherwise, you can search for any city.</p>
<em>choose your destiny...</em>
</div>
</div>
<div>
<button class="js-cd-go-button cd-button waves-effect waves-light btn green"><i class="fa fa-globe" aria-hidden="true"></i> Use My Location</button>
<button class="js-cd-search-button cd-button waves-effect waves-light btn blue"><i class="fa fa-search" aria-hidden="true"></i> Find a City</button>
</div>
</div>
</div>
</section>
<section class="js-cd-content-area-container">
<div class="row cd-search-container js-cd-search-container">
<div class="input-field col s12">
<form id="cd-search-form">
<i class="material-icons prefix white-text">search</i>
<input type="text" id="cd-search-input" name="cd-search-input" class="autocomplete white-text" placeholder="start typing city name and select from list"
required>
<label for="cd-search-input" class="white-text">City</label>
</form>
</div>
</div>
<div class="js-cd-loader cd-loader white-text">
<em>getting your city's data...</em>
<div class="preloader-wrapper big active">
<div class="spinner-layer spinner-blue-only">
<div class="circle-clipper left">
<div class="circle"></div>
</div>
<div class="gap-patch">
<div class="circle"></div>
</div>
<div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
</div>
</section>
</div>
</body>
<footer>
<div class="row">
<div class="col s12 m8 l8 xl8 offset-m2 offset-l2 offset-xl2">
<div class="card grey-text text-darken-4 z-depth-4 center">
<div class="card-content">
<div id="cd-awapi">
<img src="assets/awapi.svg" alt="AccuWeather API icon.">
<p>AccuWeather</p>
</div>
<div id="cd-fsapi">
<img src="assets/fsapi.png" alt="Foursquare API icon.">
<p>Foursquare</p>
</div>
<div id="cd-gmjsapi">
<img src="assets/gmjsapi.svg" alt="Google Maps Java Script API icon.">
<p>Google Maps JavaScript API</p>
</div>
<div id="cd-jq">
<img src="assets/jq.png" alt="jQuery icon.">
<p>jQuery</p>
</div>
<div id="cd-mat">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px"
width="114px" height="56.7px" viewBox="0 0 114 56.7" enable-background="new 0 0 114 56.7" xml:space="preserve">
<g enable-background="new ">
<g enable-background="new ">
<defs>
<ellipse id="SVGID_1_" enable-background="new " cx="538.6" cy="28.3" rx="0" ry="28.2" />
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" overflow="visible" />
</clipPath>
</g>
<g enable-background="new ">
<defs>
<ellipse id="SVGID_3_" enable-background="new " cx="-374.1" cy="28.3" rx="0" ry="28.2" />
</defs>
<clipPath id="SVGID_4_">
<use xlink:href="#SVGID_3_" overflow="visible" />
</clipPath>
<g clip-path="url(#SVGID_4_)">
<g>
<g>
<g>
<polyline fill="none" points="-374.1,-41.8 -374.1,-19.4 -374.1,3 -374.1,-19.4 -374.1,-41.8 " />
<polyline fill="none" points="-374.1,5.9 -374.1,28.3 -374.1,50.7 -374.1,28.3 -374.1,5.9 " />
<polyline fill="none" points="-374.1,53.5 -374.1,75.9 -374.1,98.3 -374.1,75.9 -374.1,53.5 " />
</g>
</g>
</g>
</g>
</g>
<g enable-background="new ">
<defs>
<path id="SVGID_5_" enable-background="new " d="M-374.1,0.1h912.6c0,0,0,12.6,0,28.2c0,15.6,0,28.2,0,28.2h-912.6 c0,0,0-12.6,0-28.2C-374.1,12.7-374.1,0.1-374.1,0.1z"
/>
</defs>
<clipPath id="SVGID_6_">
<use xlink:href="#SVGID_5_" overflow="visible" />
</clipPath>
</g>
<g enable-background="new ">
<defs>
<path id="SVGID_7_" enable-background="new " d="M-374.1,56.4c0,0,0-12.6,0-28.2c0-15.6,0-28.2,0-28.2h912.6 c0,0,0,12.6,0,28.2c0,15.6,0,28.2,0,28.2C264.8,56.4-100.3,56.4-374.1,56.4z"
/>
</defs>
<clipPath id="SVGID_8_">
<use xlink:href="#SVGID_7_" overflow="visible" />
</clipPath>
<g clip-path="url(#SVGID_8_)">
<g id="XMLID_1_">
<g>
<path fill="#EB7077" d="M95,30.3h16.3c-5.7,1.9-7.5,5.7-8.5,16.5c-0.7,7.7-4.2,9.7-4.2,9.7c-2.6,0-5.2-11.1-7.5-22.9 C92,31.6,93.2,30.6,95,30.3z"
/>
<path fill="#EB7077" d="M98.5,56.4H82.2c2.9,0,4.9-5.5,6.1-12.5c0.8-4.7,1.6-8.1,2.7-10.4C93.3,45.3,95.9,56.4,98.5,56.4z" />
<path fill="#F6A2AD" d="M91,33.5c-1.2,2.2-2,5.7-2.7,10.4c-1.2,7-3.2,12.5-6.1,12.5c-3.1-0.7-5.6-12.5-8.9-30.5 c-0.1-0.6-0.2-1.1-0.3-1.7c2.5-13,5.1-24.2,7.7-24.2h0.9c3.1,0.7,5.6,12.5,8.9,30.5C90.7,31.6,90.8,32.5,91,33.5z"
/>
<path fill="#EB7077" d="M65.3,0.1h15.4c-2.6,0-5.3,11.2-7.7,24.2C70.7,12.1,68,0.1,65.3,0.1z" />
<path fill="#EB7077" d="M73,24.3c-0.2,1.3-0.5,2.6-0.7,4c-3.7,20.2-5.9,27.6-8.5,28.2c-2.9,0-5.7-13.1-8-25.9 c0-0.2-0.1-0.4-0.1-0.6c0.1-0.6,0.2-1.1,0.3-1.7C59.7,8,61.9,0.7,64.4,0.1h0.9C68,0.1,70.7,12.1,73,24.3z"
/>
<path fill="#EB7077" d="M63.8,56.4H47.5c2.8,0,5.6-12.5,8.1-26.5c0,0.2,0.1,0.4,0.1,0.6C58.1,43.4,61,56.4,63.8,56.4z" />
<path fill="#F6A2AD" d="M55.7,30c-2.6,14-5.4,26.5-8.1,26.5C44.4,55.7,42,43.9,38.6,26c-0.1-0.6-0.2-1.1-0.3-1.7 c2.5-13,5.1-24.2,7.7-24.2h0.9C50,0.8,52.4,12.4,55.7,30z"
/>
<path fill="#EB7077" d="M30.6,0.1H46c-2.6,0-5.2,11.2-7.7,24.2C36,12.1,33.3,0.1,30.6,0.1z" />
<path fill="#EB7077" d="M38.3,24.3c-0.2,1.3-0.5,2.6-0.7,4c-3.7,20.2-5.9,27.6-8.5,28.2c-2.9,0-1.8-0.5-3.6-8.6 c-1.8-8.1-3.2-12.9-5.1-15.4c0.3-1.4,0.5-2.8,0.8-4.2C25,8,27.2,0.7,29.7,0.1h0.9C33.3,0.1,36,12.1,38.3,24.3z"
/>
<path fill="#EB7077" d="M29.1,56.4H12.8c2.6,0,5.2-11.1,7.7-24c1.8,2.5,3.2,7.3,5.1,15.4C27.4,55.9,26.2,56.4,29.1,56.4z" />
<path fill="#F6A2AD" d="M20.5,32.4c-2.5,12.9-5.1,24-7.7,24c-0.3-0.4-2.1,0-3.8-10c-1.5-9.2-4.2-15-8.6-16.1h16.3 C18.3,30.4,19.4,31,20.5,32.4z"
/>
</g>
<g>
</g>
</g>
</g>
</g>
</g>
<path fill="none" d="M194.8,54.9" />
<g enable-background="new ">
<g enable-background="new ">
<defs>
<ellipse id="SVGID_9_" enable-background="new " cx="538.6" cy="28.2" rx="0" ry="28.2" />
</defs>
<clipPath id="SVGID_10_">
<use xlink:href="#SVGID_9_" overflow="visible" />
</clipPath>
</g>
<g enable-background="new ">
<defs>
<ellipse id="SVGID_11_" enable-background="new " cx="-374.1" cy="28.2" rx="0" ry="28.2" />
</defs>
<clipPath id="SVGID_12_">
<use xlink:href="#SVGID_11_" overflow="visible" />
</clipPath>
<g clip-path="url(#SVGID_12_)">
<g>
<g>
<g>
<polyline fill="none" points="-374.1,-41.9 -374.1,-19.5 -374.1,2.9 -374.1,-19.5 -374.1,-41.9 " />
<polyline fill="none" points="-374.1,5.8 -374.1,28.2 -374.1,50.6 -374.1,28.2 -374.1,5.8 " />
<polyline fill="none" points="-374.1,53.4 -374.1,75.8 -374.1,98.2 -374.1,75.8 -374.1,53.4 " />
</g>
</g>
</g>
</g>
</g>
<g enable-background="new ">
<defs>
<path id="SVGID_13_" enable-background="new " d="M-374.1,0h912.6c0,0,0,12.6,0,28.2s0,28.2,0,28.2h-912.6c0,0,0-12.6,0-28.2 S-374.1,0-374.1,0z"
/>
</defs>
<clipPath id="SVGID_14_">
<use xlink:href="#SVGID_13_" overflow="visible" />
</clipPath>
</g>
<g enable-background="new ">
<defs>
<path id="SVGID_15_" enable-background="new " d="M-374.1,56.3c0,0,0-12.6,0-28.2s0-28.2,0-28.2h912.6c0,0,0,12.6,0,28.2 s0,28.2,0,28.2C264.8,56.3-100.3,56.3-374.1,56.3z"
/>
</defs>
<clipPath id="SVGID_16_">
<use xlink:href="#SVGID_15_" overflow="visible" />
</clipPath>
<g clip-path="url(#SVGID_16_)">
<g id="XMLID_2_">
<g>
<path fill="#EB7077" d="M95,30.2h16.3c-5.7,1.9-7.5,5.7-8.5,16.5c-0.7,7.7-4.2,9.7-4.2,9.7c-2.6,0-5.2-11.1-7.5-22.9 C92,31.5,93.2,30.5,95,30.2z"
/>
<path fill="#EB7077" d="M98.5,56.3H82.2c2.9,0,4.9-5.5,6.1-12.5c0.8-4.7,1.6-8.1,2.7-10.4C93.3,45.2,95.9,56.3,98.5,56.3z" />
<path fill="#F6A2AD" d="M91,33.4c-1.2,2.2-2,5.7-2.7,10.4c-1.2,7-3.2,12.5-6.1,12.5c-3.1-0.7-5.6-12.5-8.9-30.5 c-0.1-0.6-0.2-1.1-0.3-1.7C75.5,11.2,78.1,0,80.7,0h0.9c3.1,0.7,5.6,12.5,8.9,30.5C90.7,31.4,90.8,32.4,91,33.4z"
/>
<path fill="#EB7077" d="M65.3,0h15.4c-2.6,0-5.3,11.2-7.7,24.2C70.7,12,68,0,65.3,0z" />
<path fill="#EB7077" d="M73,24.2c-0.2,1.3-0.5,2.6-0.7,4c-3.7,20.2-5.9,27.6-8.5,28.2c-2.9,0-5.7-13.1-8-25.9 c0-0.2-0.1-0.4-0.1-0.6c0.1-0.6,0.2-1.1,0.3-1.7C59.7,7.9,61.9,0.6,64.4,0h0.9C68,0,70.7,12,73,24.2z"
/>
<path fill="#EB7077" d="M63.8,56.3H47.5c2.8,0,5.6-12.5,8.1-26.5c0,0.2,0.1,0.4,0.1,0.6C58.1,43.3,61,56.3,63.8,56.3z" />
<path fill="#F6A2AD" d="M55.7,29.9c-2.6,14-5.4,26.5-8.1,26.5c-3.1-0.7-5.6-12.5-8.9-30.5c-0.1-0.6-0.2-1.1-0.3-1.7 C40.8,11.2,43.4,0,46,0h0.9C50,0.7,52.4,12.2,55.7,29.9z"
/>
<path fill="#EB7077" d="M30.6,0H46c-2.6,0-5.2,11.2-7.7,24.2C36,12,33.3,0,30.6,0z" />
<path fill="#EB7077" d="M38.3,24.2c-0.2,1.3-0.5,2.6-0.7,4c-3.7,20.2-5.9,27.6-8.5,28.2c-2.9,0-1.8-0.5-3.6-8.6 c-1.8-8.1-3.2-12.9-5.1-15.4c0.3-1.4,0.5-2.8,0.8-4.2C25,7.9,27.2,0.6,29.7,0h0.9C33.3,0,36,12,38.3,24.2z"
/>
<path fill="#EB7077" d="M29.1,56.3H12.8c2.6,0,5.2-11.1,7.7-24c1.8,2.5,3.2,7.3,5.1,15.4C27.4,55.8,26.2,56.3,29.1,56.3z" />
<path fill="#F6A2AD" d="M20.5,32.3c-2.5,12.9-5.1,24-7.7,24c-0.3-0.4-2.1,0-3.8-10c-1.5-9.2-4.2-15-8.6-16.1h16.3 C18.3,30.2,19.4,30.9,20.5,32.3z"
/>
</g>
<g>
</g>
</g>
</g>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
<p>Materialize</p>
</div>
<div id="cd-usapi">
<img src="assets/usapi.jpg" alt="Unsplash API icon.">
<p>Unsplash</p>
</div>
</div>
<div class="card-action grey lighten-1 black-text">
Designed by Andy Amaya | Powered by APIs and Frameworks above!
</div>
</div>
</div>
</div>
</footer>
<div class="cd-photo-attribution js-cd-photo-attribution">Photo by Andy Amaya / Unsplash</div>
</html>