-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
executable file
·162 lines (118 loc) · 5.87 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
<!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>
<script src="https://unpkg.com/@warnick/forecast-js/dist/js/forecast.min.js" defer></script>
<link rel="stylesheet" href="https://unpkg.com/@warnick/forecast-js/dist/css/forecast.css">
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="results" id="app" data-default-zip="90210">
<input placeholder="Enter Your ZIP Code" v-on:input="zip_trigger" name="name" id="zip" />
<h1>TIME</h1>
<p v-bind:class="time.day">{{time.day}}</p>
<p class="date">{{time.date}}</p>
<p class="time">{{time.hour_12}}:{{time.minute}}:{{time.seconds}} {{time.ampm}}</p>
<p v-bind:class="time.moom.class">{{time.moom.name}}</p>
<p>{{ time.timezone }}</p>
<h1>META</h1>
<p class="zip">{{location.zip}}</p>
<p class="latitude">{{location.coord.lat}}</p>
<p class="longitude">{{location.coord.lon}}</p>
<p class="city">{{location.city}}</p>
<!-- <p class="city">{{location.name}}</p> -->
<p class="state">{{location.state}}</p>
<p>{{error}}</p>
<div class="alerts" v-if="alert">
<h1>ALERTS</h1>
<div v-for="a in alerts">
<p>{{ a.type }}</p>
<p>{{ a.severity }} / {{ a.certainty }}</p>
<p>{{ a.headline }}</p>
<p>{{ a.instruction }}</p>
<p>---</p>
<p>{{ a.description }}</p>
</div>
</div>
<h1>CURRENT</h1>
<p class="description">{{current.description_main}}</p>
<p class="description_long">{{current.description_long}}</p>
<p class="icon">{{current.icon}}</p>
<div class="icon" v-if="current.icon" >
<img v-bind:src="'https://raw.githubusercontent.com/ajwarnick/ART390_Weather_Demo/master/icons/' + current.icon + '.png'" v-bind:alt="current.description_main">
</div>
<p class="degree_symbol current">{{current.temp.current}}</p>
<p class="degree_symbol high">{{current.temp.high}}</p>
<p class="degree_symbol low">{{current.temp.low}}</p>
<p class="degree_symbol feelslike">{{current.temp.feelslike}}</p>
<p class="windspeed">{{current.wind.speed}}</p>
<p class="cloudcover">{{current.cloud_cover}}</p>
<p class="rain">{{current.rain}}</p>
<p class="snow">{{current.snow}}</p>
<p class="pressure">{{current.pressure.barometric}} {{current.pressure.unit}}</p>
<p class="pressure">{{current.pressure.seaLevel}} {{current.pressure.unit}}</p>
<p class="humidity">{{current.humidity}}</p>
<p class="dewpoint">{{current.dewpoint}}</p>
<p class="sunrise">{{current.sunrise}}</p>
<p class="sunset">{{current.sunset}}</p>
<p class="uv">{{current.uv}}</p>
<h4>Air Quality</h4>
<p class="air_quality">{{current.air_quality.name}} : {{current.air_quality.aqi}} - {{current.air_quality.discription}}</p>
<h5>JSON Object</h5>
<p class="air_quality">{{current.air_quality}}</p>
<h1>HOURLY</h1>
<h4>Hour 1</h4>
<p>{{hourly[1].isDaytime ? 'Day' : 'Night' }}</p>
<p>{{hourly[1].time}}</p>
<p>{{hourly[1].number}}</p>
<p>{{hourly[1].shortForecast}}</p>
<p>{{hourly[1].startTime}}</p>
<p class="degree_symbol">{{hourly[1].temperature}}</p>
<p>{{hourly[1].temperatureTrend}}</p>
<p>{{hourly[1].windSpeed}}</p>
<p>{{hourly[1].windDirection}}</p>
<h1>FORECAST</h1>
<h4>Day 1</h4>
<h6>{{forecast[0].weekday}}</h6>
<p v-bind:class="forecast[0].moon.class">{{forecast[0].moon.name}}</p>
<p class="degree_symbol">High - {{forecast[0].max_temp}}</p>
<p class="degree_symbol">Low - {{forecast[0].min_temp}}</p>
<p>exmaple</p>
<p>{{ forecast[0].uv ? Math.round( forecast[0].uv ) : "" }}</p>
<p>{{ forecast[0].uv }}</p>
<p>{{ forecast[0].weather.description }}</p>
<p>{{forecast[0].icon}}</p>
<div class="icon" v-if="forecast[0].icon" >
<img v-bind:src="'https://raw.githubusercontent.com/ajwarnick/ART390_Weather_Demo/master/icons/' + forecast[0].icon + '.png'" v-bind:alt="forecast[0].weather.description">
</div>
<div v-bind:class="'icon_'+forecast[0].icon" class="red"></div>
<p>{{forecast[0].wind_spd}} mph</p>
<p>{{forecast[0].wind_cdir_full}}</p>
<p>{{forecast[0].wind_cdir}}</p>
<p>{{forecast[0].vis}}</p>
<p>{{forecast[0].pop}}</p>
<p>{{forecast[0].precip}}</p>
<p>{{forecast[0].snow}}</p>
<p>{{forecast[0].dewpt}}</p>
<p>{{forecast[0].pres}} mb</p>
<div class="fullObjects">
<h1>TIME</h1>
{{time}}
<h1>LOCATION</h1>
{{location}}
<h1>ALERT</h1>
{{alert}}
<h1>CURRENT</h1>
{{current}}
<h1>HOURLY</h1>
{{hourly[0]}}
<h1>FORECAST</h1>
{{forecast[0]}}
</div>
</div>
<!-- <div id="map" class="map"></div> -->
</body>
</html>