-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
461 lines (442 loc) · 24.5 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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<html>
<!-- Meta Tags and other stuff. -->
<meta name="authors" content="Jesse Hasty">
<meta name="keywords" content="Intellistar, Weather Channel, Local Forecast">
<title>Intellistar</title>
<!-- charset is set to UTF-8 for Japanese and Hebrew character support. -->
<meta charset="UTF-8">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Scripts -->
<script type="text/javascript" src="./js/config.js"></script>
<script type="text/javascript" src="./js/script.js"></script>
<script type="text/javascript" src="./js/alerts.js"></script>
<script type="text/javascript" src="./js/forecast.js"></script>
<script type="text/javascript" src="./js/slides.js"></script>
<script type="text/javascript" src="./js/time.js"></script>
<!-- CSS -->
<link rel="stylesheet" href="./css/intelli.css">
<body>
<!-- The Current Conditions Section. -->
<div class="container">
<div id="bg">
<img style="width: 729px; height: 547px;" src="./images/bg/bg1.png">
</div>
<!-- Current Conditions Slide -->
<div id="nextslide" style="position: absolute;">
<img class="panel" src="./images/panels/cc.png" style="opacity: 89.33%; position: absolute;">
<div class="slideplaceholder">Now</div>
<button id="nextslidebutton" onclick="myFunction()" style="height: fit-content;">Next Slide</button>
<!-- City Name -->
<div class="city" id="cityn">Washington</div>
<div id="icon" class="iconc">
<img src="./images/icons/2010/26.png">
</div>
<!-- Left Side -->
<div class="cond" id="condition">Clear</div>
<div class="temperature" id="temp">28</div>
<!-- Right Side -->
<!-- Humidity -->
<div class="rightcontainer" id="rightcontainer">
<div class="name">HUMIDITY</div>
<div id="humidity" class="value">83%</div>
<!-- Dew Point -->
<div class="name"
style="margin-top: 60px; display: flex; margin-right: 15px; font-size: 22px; width: 250px;">DEW
POINT</div>
<div id="dewpoint" style="margin-top: 50px;" class="value">25°</div>
<!-- Pressure -->
<div class="name"
style="margin-top: 107px; display: flex; margin-right: 15px; font-size: 22px; width: fit-content;">
PRESSURE</div>
<div id="pressure" style="margin-top: 100px;" class="value">30.31 <div id="pressunit" class="small">
INCHES</div>S</div>
<div class="name"
style="margin-top: 153px; display: flex; margin-right: 15px; font-size: 22px; width: fit-content;">
VISIBILITY</div>
<div id="visibility" style="margin-top: 144px;" class="value">10<div class="small">MILES</div>
</div>
<div class="name"
style="margin-top: 198px; display: flex; margin-left: 65px; font-size: 22px; width: fit-content;">
WIND</div>
<div id="wind" style="margin-top: 191px; width: 277px;" class="value">NE 1</div>
<div class="name"
style="margin-top: 246px; display: flex; margin-left: 50px; font-size: 22px; width: fit-content;">
GUSTS</div>
<div id="gusts" style="margin-top: 236px; width: 133px;" class="value">None</div>
<div class="name"
style="margin-top: 292px; display: flex; margin-left: -10px; font-size: 22px; width: 250px;">FEELS
LIKE</div>
<div id="feelslike" style="margin-top: 283px; width: 133px;" class="value">28°</div>
</div>
</div>
<div id="alertslide" class="alert-slide">
<div class="slideplaceholder"
style="letter-spacing: 1.6px;width: 660px;margin-top: 40px;margin-left: 46px;">Weather Bulletin</div>
<button id="radarbutton" style="position: absolute;" onclick="radar()">Next Slide</button>
<img class="bulletinpanel" src="./images/panels/bulletin.png">
<div class="alert" id="alerttext">No Alert.</div>
<p class="nwstextbulletin">The National Weather Service</p>
<img class="noaalogo" src="./images/twcicons/noaalogo.png">
<img class="bulletinimage" src="./images/bg/weatherbulletin.png">
</div>
<div class="radarcontainer" id="radarslide">
<div id="mapboxmap"></div>
<div class="mosaicthing" id="radarimagery"></div>
<button id="forecastslidebutton" style="position: absolute;" onclick="forecastslide()">Next Slide.</button>
<img class="radarpanel" src="./images/panels/radarpanel.png">
<img class="radarpanel" style="margin-left: 282px;width: 83px;height: 11px;margin-top: 89px;" src="./images/panels/mix.png">
<img class="radarpanel" style="width: 83px;height: 11px;margin-top: 89px;margin-left: 430px;" src="./images/panels/snow.png">
<div class="slideplaceholder" style="width: 660px; margin-top: 42px;">Regional Radar</div>
<div class="rainlegend" id="rain">rain</div>
<div class="rainlegend" style="margin-left: 199px;" id="mix">mix/ice</div>
<div class="rainlegend" style="margin-left: 370px;" id="snow">snow</div>
<img class="rainimg" src="./images/panels/radar.png">
</div>
<div class="almanac" id="almanacslide">
<div class="almanacpanel">
<div class="slideplaceholder" style="margin-top: -52px; margin-left: 12px; font-size: 38px;">Almanac
</div>
<div class="sunrisesunsettimes">
<div class="dayofweek001" id="almanacday0">TUESDAY</div>
<div class="dayofweek002" id="almanacday1">WEDNESDAY</div>
<div class="sunrisen">SUNRISE</div>
<div class="sunsetn">SUNSET</div>
<div id="sunrise0" class="sunrisep">8:04 am</div>
<div id="sunset0" class="sunsetp">5:25 pm</div>
<div id="sunrise1" style="margin-left: 333px;" class="sunrisep">8:04 am</div>
<div id="sunset1" style="margin-left: 333px;" class="sunsetp">5:26 pm</div>
</div>
<div class="lowerplaceholder">
<div class="stationname" id="station"></div>
<div class="almanacdays" id="almanacdate">December 25</div>
<!-- Left Side Stuff -->
<div class="yesterdaysactual">Yesterday's Actual</div>
<div class="todaysaverage">Today's Average</div>
<div class="todaysrecords">Today's Records</div>
<div class="almanachi">HIGH</div>
<div class="almanaclo">LOW</div>
<!-- End of Left Side Stuff -->
<!-- Values -->
<div class="yesterdayhigh" id="yesthi">37</div>
<div class="yesterdaylow" id="yestlo">24</div>
<div class="averagehigh" id="avhi">36</div>
<div class="averagelow" id="avlo">21</div>
<div class="recordhiyear" id="maxyear">1893</div>
<div class="recordmax" id="rmax">64</div>
<div class="recordminy" id="minyear">1883</div>
<div class="recordmin" id="rmin">-13</div>
</div>
<img style="width: 645px; height: 349px" src="./images/panels/almanac.png">
</div>
<button id="forecastslidebutton1" style="position: absolute;" onclick="forecastslidee()">Next Slide.</button>
</div>
<div class="forecastcontainer" id="forecastpanel">
<div class="forecastpanel">
<div class="slideplaceholder" style="margin-top: -52px; margin-left: 8px; font-size: 38px;">Local
Forecast
</div>
<div class="city" id="citynf" style="top: 4.11px; margin-left: 6px;">WASHINGTON</div>
<div class="dayname" id="daypartn1">Tonight</div>
<div class="forecast" id="forecast1">Partly cloudy. Low 32. Winds W at 5 to 10 mph.</div>
<img src="./images/panels/forecast.png">
</img>
<button id="forecastslidebutton2" style="position: absolute;" onclick="forecastslide1()">Next
Slide.</button>
</div>
</div>
<div class="forecastcontainer" id="forecastpanel1">
<div class="forecastpanel">
<div class="slideplaceholder" style="margin-top: -52px; margin-left: 8px; font-size: 38px;">Local
Forecast</div>
<div class="city" id="citynf1" style="top: 4.11px; margin-left: 6px;">WASHINGTON</div>
<div class="dayname" id="daypartn2">Tommorow</div>
<div class="forecast" id="forecast2">Sunny. </div>
<img src="./images/panels/forecast.png">
</img>
<button id="forecastslidebutton3" style="position: absolute;" onclick="forecastslide2()">Next
Slide.</button>
</div>
</div>
<div class="forecastcontainer" id="forecastpanel2">
<div class="forecastpanel">
<div class="slideplaceholder" style="margin-top: -52px; margin-left: 8px; font-size: 38px;">Local
Forecast</div>
<div class="city" id="citynf2" style="top: 4.11px; margin-left: 6px;">WASHINGTON</div>
<div class="dayname" id="daypartn3">Tonight</div>
<div class="forecast" id="forecast3">Partly cloudy. Low 32. Winds W at 5 to 10 mph.</div>
<img src="./images/panels/forecast.png">
</img>
<button id="forecastslidebutton4" style="position: absolute;" onclick="forecastslide3()">Next
Slide.</button>
</div>
</div>
<div class="extendedcontainer" id="extendedforecast">
<button id="forecastslidebutto4" style="position: absolute;" onclick="redirect()">Restart the
Emulator.</button>
<div class="slideplaceholder" style="margin-top: 38px;margin-left: 67px;font-size: 38px;">The Week Ahead
</div>
<div class="citynames">
<div class="ename" id="ename0">MON</div>
<div class="ename" id="ename1" style="margin-left: 175px;">TUE</div>
<div class="ename" id="ename2" style="margin-left: 259px;">WED</div>
<div class="ename" id="ename3" style="margin-left: 354px;">THU</div>
<div class="ename" id="ename4" style="margin-left: 452px;">FRI</div>
<div class="ename" id="ename5" style="margin-left: 540px;">SAT</div>
<div class="ename" id="ename6" style="margin-left: 633px;">SUN</div>
</div>
<div class="icons" id="icons">
<img id="icon0" src="/images/icons/2007/32.gif">
<img id="icon1" style="margin-left: 151px" src="/images/icons/2007/32.gif">
<img id="icon2" style="margin-left: 246px" src="/images/icons/2007/32.gif">
<img id="icon3" style="margin-left: 336px;" src="/images/icons/2007/32.gif">
<img id="icon4" style="margin-left: 428px;" src="/images/icons/2007/32.gif">
<img id="icon5" style="margin-left: 519px;" src="/images/icons/2007/32.gif">
<img id="icon6" style="margin-left: 614px;" src="/images/icons/2007/32.gif">
</div>
<div id="conditions" class="conditionlist">
<div class="condition" id="weather00">Partly Cloudy</div>
<div class="condition" id="weather01" style="margin-left: 67px;">PM Showers</div>
<div class="condition" id="weather02" style="margin-left: 159px;">Partly Cloudy</div>
<div class="condition" id="weather03" style="margin-left: 250px;">Few Showers</div>
<div class="condition" id="weather04" style="margin-left: 338px;">Cloudy</div>
<div class="condition" id="weather05" style="margin-left: 417px;">Showers</div>
<div class="condition" id="weather06" style="margin-left: 521px;">Partly Cloudy</div>
</div>
<div class="temperaturelist" id="temps">
<div class="hightemps" id="hightemplist">
<div class="hightemp" id="hi0">44</div>
<div class="hightemp" id="hi1" style="margin-left: 93px;">47</div>
<div class="hightemp" id="hi2" style="margin-left: 181px;">47</div>
<div class="hightemp" id="hi3" style="margin-left: 275px;">44</div>
<div class="hightemp" id="hi4" style="margin-left: 367px;">50</div>
<div class="hightemp" id="hi5" style="margin-left: 457px;">44</div>
<div class="hightemp" id="hi6" style="margin-left: 546px;">45</div>
</div>
<div class="lowtemps" id="lowtemps">
<div class="lowtemp" id="lo0">32</div>
<div class="lowtemp" id="lo1" style="margin-left: 93px;">31</div>
<div class="lowtemp" id="lo2" style="margin-left: 181px;">32</div>
<div class="lowtemp" id="lo3" style="margin-left: 275px;">32</div>
<div class="lowtemp" id="lo4" style="margin-left: 367px;">39</div>
<div class="lowtemp" id="lo5" style="margin-left: 457px;">36</div>
<div class="lowtemp" id="lo6" style="margin-left: 546px;">38</div>
</div>
</div>
<img class="extendedpanel" src="./images/panels/extended.png">
<div class="city" id="citynamee" style="top: 94.11px;margin-left: 59px;">WASHINGTON</div>
</div>
</div>
</div>
<div class="ldl" id="ldlb">
<!-- Bottom -->
<div class="marqueeimg">
<div class="innerldlimg" id="nmarquee" style="position: absolute;">
<div class="alert" id="nwsalert"></div>
<marquee class="marquee" id="scrollingmarquee" float="left" scrollamount="6" scrolldelay="100">
(If you are seeing this scroll, you may have to open this page in a new tab, or close then open your web browser, and make sure all your tabs are closed before doing so. Otherwise, there is a faulty error in the configs.) Today's Bible Verse is John 13:11. For he knew who was going to betray him, and that was why he said not
every one was clean.</marquee><img id="marqueebar" class="scroll" src="./images/ldl/LDLBar.png">
</div>
<div id="twciconco" style="position: absolute; display: flex;">
<img class="twcimg" id="imageatime" style="position: absolute;" src="./images/twcicons/2005.png">
</div>
<div id="innertime">
<div class="timer" id="time" style="position: absolute; margin-left: 571px;">12:00</div>
</img>
</div>
</div>
</div>
</body>
</html>
<!-- Stuff I could not put into a JS file. -->
</script>
<!-- time.js -->
<script>
</script>
<!-- radar.js -->
<script>
// Fetch Radar title imagery
map_img = `https://api.mapbox.com/styles/v1/goldbblazez/ckgc8lzdz4lzh19qt7q9wbbr9/static/${lon},${lat},7/729x546?access_token=${map_key}`
radar_url = `https://maps.aerisapi.com/wgE96YE3scTQLKjnqiMsv_SVG2gQFV8y9DjKR0BRY9wPoSLvrMrIqF9Lq2IYaY/radar/729x546/${lat},${lon},8/latest.png`
document.getElementById("mapboxmap").innerHTML = `<img style="position: absolute;" src="${map_img}"></img>`
document.getElementById('radarimagery').innerHTML = `<img style="position: absolute; background-color: transparent;" src="${radar_url}"></img>`
</script>
<!-- vars.js -->
<script>
</script>
<!-- weekdays.js -->
<script>
// Script for weekdays
const d = new Date();
const weekdays = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
const dayofweek = d.getDay() + 1;
const weekday = weekdays[d.getDay() + 1]
// Function for getting almanac day
var month = `${d.getMonth() + 1}`
var day = `${d.getDate()}`
var year = `${d.getFullYear()}`
// Function for Almanac Weekdays
const weekdaysfull = ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"]
var almanacwkday01 = weekdaysfull[d.getDay()]
var almanacwkday02 = weekdaysfull[d.getDay() + 1]
// Function for Alamanac Day
const months = ["JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER"]
var alamacday = d.getDate() + 1
var almanacm = months[d.getMonth()]
document.getElementById("almanacdate").innerHTML = `${months[d.getMonth()]} ${d.getDate()}`
// Section for day names for the extended forecast.
document.getElementById('ename0').innerHTML = `${weekdays[d.getDay()]}`;
document.getElementById('ename1').innerHTML = `${weekdays[d.getDay() + 1]}`;
document.getElementById('ename2').innerHTML = `${weekdays[d.getDay() + 2]}`;
document.getElementById('ename3').innerHTML = `${weekdays[d.getDay() + 3]}`;
document.getElementById('ename4').innerHTML = `${weekdays[d.getDay() + 4]}`;
document.getElementById('ename5').innerHTML = `${weekdays[d.getDay() + 5]}`;
document.getElementById('ename6').innerHTML = `${weekdays[d.getDay() + 6]}`;
</script>
<!-- icon.js -->
<script>
changeicon();
async function changeicon() {
var icon = `${twciconstyle}`
document.getElementById('twciconco').innerHTML = `<img class="twcimg" id="imageatime" style="position: absolute;" src="./images/twcicons/${icon}.png"></div>`;
}
changeicon()
</script>
<!-- history.js -->
<script>
// This part is finding yesterday's date
d = new Date() - 1
month = d.getMonth()
day = d.getDate()
function todayday() {
da = new Date()
todayday = d.getDay()
todaymonth = d.getMonth()
}
</script>
<script>
getAlmanac();
const almanacurl = `https://api.weather.com/v3/wx/almanac/daily/5day?geocode=${lat},${lon}&format=json&units=${units}&startDay=${day}&startMonth=${month}&apiKey=e1f10a1e78da46f5b10a1e78da96f525`
async function getAlmanac() {
const response = await fetch(almanacurl)
const data = await response.json();
const { almanacRecordYearMin, almanacRecordYearMax, stationName, temperatureRecordMin, temperatureAverageMax, temperatureAverageMin, temperatureRecordMax } = data;
console.log(data)
// Almanac Weekdays
document.getElementById('almanacday0').innerHTML = `${almanacwkday01}`
document.getElementById("almanacday1").innerHTML = `${almanacwkday02}`
// Today's Average
document.getElementById('avhi').innerHTML = `${temperatureAverageMax[0]}`
document.getElementById('avlo').innerHTML = `${temperatureAverageMin[0]}`
// Records
document.getElementById('rmin').innerHTML = `${temperatureRecordMin[0]}`
document.getElementById("rmax").innerHTML = `${temperatureRecordMax[0]}`
if (temperatureRecordMax[0] === null) {
document.getElementById("rmax").innerHTML = `--`
} else {
document.getElementById("rmax").innerHTML = `${temperatureRecordMax[0]}`
}
if (temperatureRecordMin[0] === null) {
document.getElementById('rmin').innerHTML = `--`
} else {
document.getElementById('rmin').innerHTML = `${temperatureRecordMin[0]}`
}
// Record Years
// Function almanacstationname
document.getElementById("station")
if (almanacstationname !== "") {
document.getElementById("station").innerHTML = `${almanacstationname}`
} if (almanacstationname === "") {
station.innerHTML = `${stationName[0]}`
}
document.getElementById('maxyear').innerHTML = `${almanacRecordYearMax[0]}`
document.getElementById("minyear").innerHTML = `${almanacRecordYearMin[0]}`;
if (almanacRecordYearMax[0] === null) {
document.getElementById('maxyear').innerHTML = `----`
} else {
document.getElementById('maxyear').innerHTML = `${almanacRecordYearMax[0]}`
}
if (almanacRecordYearMin[0] === null) {
document.getElementById('minyear').innerHTML = `----`
} else {
document.getElementById('minyear').innerHTML = `${almanacRecordYearMin[0]}`
}
}
getAlmanac();
</script>
<!-- almanac2.js -->
<script>
// Function for Yesterday's high and low.
yesterdaytemps();
async function yesterdaytemps() {
const historyurl = `https://api.weather.com/v3/wx/conditions/historical/dailysummary/30day?geocode=${lat},${lon}&language=${lang}-${country}&format=json&units=${units}&apiKey=${api_key}`
const response = await fetch(historyurl);
const data = await response.json();
const { temperatureMax, temperatureMin } = data;
document.getElementById("yesthi").innerHTML = `${temperatureMax[0]}`
document.getElementById("yestlo").innerHTML = `${temperatureMin[0]}`
if (temperatureMin[0] == null) {
yestlo.innerHTML = `${temperatureMin[1]}`
} else {
yestlo.innerHTML = `${temperatureMin[0]}`
}
// Ignore this, for Background.
document.getElementById('bg').innerHTML = `<img style="width: 729px; height: 547px;" src="./images/bg/${bg}.${bgformat}">`
}
yesterdaytemps();
</script>
<script>
</script>
<!-- ldltime.js -->
<script>
function getTime() {
console.log(timezone)
let d = new Date()
var hour = new Date().getHours().toLocaleString("en-US", {timeStyle: "short", timeZone: `${timezone}`})
var minute = d.getMinutes().toLocaleString("en-US", {timeStyle: "short", timeZone: `${timezone}`})
if (hour >= 13) {
var hour = `${hour - 12}`
} if (hour == 0) {
var hour = `${hour + 12}`
}
if (minute <= 9) {
var minute = `0${minute}`
};
document.getElementById("time").innerHTML = `${hour}:${minute}`
}
getTime()
setInterval(getTime, 1000)
</script>
<script>
function auto() {
if (automatictransition === "false") {
document.getElementById("nextslidebutton").style.display = "block"
document.getElementById("radarbutton").style.display = "block"
document.getElementById("forecastslidebutton").style.display = "block"
document.getElementById("forecastslidebutton1").style.display = "block"
document.getElementById("forecastslidebutton2").style.display = "block"
document.getElementById("forecastslidebutton3").style.display = "block"
document.getElementById("forecastslidebutton4").style.display = "block"
} else {
setTimeout(myFunction, 8000)
setTimeout(radar, 16000)
setTimeout(forecastslide, 28000)
setTimeout(forecastslidee, 36000)
setTimeout(forecastslide1, 42000)
setTimeout(forecastslide2, 50000)
setTimeout(forecastslide3, 58000)
setTimeout(redirect, 66000)
document.getElementById("nextslidebutton").style.display = "none"
document.getElementById("radarbutton").style.display = "none"
document.getElementById("forecastslidebutton").style.display = "none"
document.getElementById("forecastslidebutton1").style.display = "none"
document.getElementById("forecastslidebutton2").style.display = "none"
document.getElementById("forecastslidebutton3").style.display = "none"
document.getElementById("forecastslidebutton4").style.display = "none"
document.getElementById("rightcontainer").style.marginTop = "120px"
document.getElementById("icon").style.marginTop = "130px"
document.getElementById("condition").style.marginTop = "273px"
}
}
auto()
</script>