diff --git a/webroot/css/weatherscan.css b/webroot/css/weatherscan.css
index 08f634c..41fe11a 100644
--- a/webroot/css/weatherscan.css
+++ b/webroot/css/weatherscan.css
@@ -1727,19 +1727,19 @@ background-image: url(/images/moonphases/new.png);
}
.info-slide-content.almanac .frost-pane.purple .phase.i .icon{
-background-image: url(/images/moonphases/new.png);
+background-image: url(/images/moonphases/NEW.png);
}
.info-slide-content.almanac .frost-pane.purple .phase.ii .icon{
background-repeat: no-repeat;
background-size: contain;
background-position: center center;
- background-image: url(/images/moonphases/half1.png);
+ background-image: url(/images/moonphases/FIRST.png);
}
.info-slide-content.almanac .frost-pane.purple .phase.iii .icon{
- background-image: url(/images/moonphases/full.png);
+ background-image: url(/images/moonphases/FULL.png);
}
.info-slide-content.almanac .frost-pane.purple .phase.iv .icon{
- background-image: url(/images/moonphases/half2.png);
+ background-image: url(/images/moonphases/LAST.png);
}
.info-slide-content.almanac .frost-pane.purple .phase .date {
diff --git a/webroot/images/moonphases/half1.png b/webroot/images/moonphases/FIRST.png
similarity index 100%
rename from webroot/images/moonphases/half1.png
rename to webroot/images/moonphases/FIRST.png
diff --git a/webroot/images/moonphases/half2.png b/webroot/images/moonphases/LAST.png
similarity index 100%
rename from webroot/images/moonphases/half2.png
rename to webroot/images/moonphases/LAST.png
diff --git a/webroot/index.html b/webroot/index.html
index f5e271f..e62b780 100644
--- a/webroot/index.html
+++ b/webroot/index.html
@@ -1464,15 +1464,237 @@
+
+ Know the difference in Winter Weather Warnings:
+
+
+ - Winter Weather Advisory - hazardous winter weather
is occuring, imminent, and is an inconvenience.
+
+
+ - Winter Weather Warning - hazardous winter weather is
occuring, imminent, and is a threat to life
and property.
+
+
+ To prevent Frozen Water Pipes insulate with:
+
+
+ - A "pipe sleeve", UL-Listed "heat tape", or
similar materials.
+
+
+ - Newspaper can provide some degree of
insulation and protection to exposed pipes -
even 1/4" of newspaper can help.
+
+
+ To prevent Frozen Water Pipes insulate with:
+
+
+ - Let cold water frip from ffaucets served by
exposed pipes.
+
+
+ - While away during cold weather, leave the heat on,
set no lower than 55°F.
+
+
+ To prevent Frozen Water Pipes:
+
+
+ - Open outside hose bibs to drain water and
+ keep them open so remaining water can expand
+ without breaking the pipe.
+
+
+ Be prepared if you get stranded, with:
+
+
+ - Compass and First Aid Kit
+
+ - Ice scraper and snow brush
+
+ - Wooden matches in a waterproof container
+
+ - Non-perishable high-energy foods
+
+ - Woolen mittens, socks, a cap and blankets
+
+
+ Never leave infants, children, or pets in a parked car.
+
+
+ In case of a severe thunderstorm:
+
+ Pull safely onto the shoulder of the road away
+ from any trees that could fall on the vehicle.
+
+ Stay in the car and turn on the emergency
+ flashers until the heavy rains subside.
+
+
+ In case of Lightning -
+
+ An automobile provides better insulation against
+
+ lightning than being in the open.
+
+
+ Avoid contact with any metal conducting surfaces
+
+ either inside your car or outside.
+
+
+ Tornado Safety -
+
+ Never try to out-drive a tornado
+
+ Tornadoes can change direction quickly and
+ can lift a car ot truck and toss it through
+ the air.
+
+
+ Driving Tips:
+
+
+ Do not pump anti-lock brakes.
+ The right way is to "stomp and steer!"
+
+
+ Driving Tips-
+
+
+ Change windshield wiper blades at least twice
+ a year or every 6,000 miles.
+
+
+ Make sure your cruise control is turned off
+ during wet weather driving.
+
+
+ Be prepared for winter driving emergencies with the following in your truck:
+ - Spare tire, wheel wrench and tripod-type jack
+ - Shovel
+ - Jumper cables
+ - Tow and tire chains
+ - Bag of salt or cat litter
+ - Tool kit
+
+
+ Don't use your cruise control in wintry conditions.
+
+
+ Even roads that appear clear can have sudden
+ slippery spots, and the short touch of your brakes
+ to deactivate the cruise control feature can cause
+ you to lose control of your vehicle.
+
+
+ Pet Safety Tips:
+
+
+ - Antifreeze is deadly to pets.
+
+
+ - Use "safe" non toxic antifreeze and clean spills
+ immediately - especially if pets are housed in the
+ garage.
+
+
+ Pet Safety Tips:
+
+
+ - Shout, beep the horn, or pound on the hood before
+ starting the engine of and outdoor vehicle.
+
+
+ - Cats and other small animals may seek warmth by
+ crawling into car engines, which can be dangerous
+ or fatal.
+
+
+ Pet Safety Tips:
+
+
+ - After letting your pet out, be sure to wipe their
+ paws when they come back inside. Tender pads can be
+ injured from salts and other ice melting chemicals.
+
+
+
+ Complete your Family Preparedness Plan at
+ weather.com/READY
+
+
+ Use sunscreen during the winter.
+
+ - Skiers are at higher risk of UV damage to eyes
+ and skin due to stronger UV rays at higher altitudes.
+
+ - Snow reflects the sun's rays and UV radiation.
+
+
+ Use sunscreen during the winter.
+
+ Cloudy skies may make the air temperature cooler,
+ but UV rays are still coming through.
+
+
+ To minimize colds and flu:
+
+
+ - Wash your hands frequently to protect from
+ germs.
+
+ - Avoid using public pens & pencils (use you own
+ at doctor's offices, stores, banks, etc.)
+
+
+ To minimize colds and flu:
+
+
+ - Disinfect and sanitize home surfaces including
+ doorknobs, telephones, even the TV remote control.
+
+
+ To prevent accidental fires:
+
+
+ - Use flashlights, not candles - if you lose
+ electrical power.
+
+
+ - Keep space heaters at least three feet away from
+ furnishings, drapes, and all flammable objects.
+
+
+ To prevent accidental fires:
+
+
+ - Turn off space heaters when you leave the room.
+
+
+ Complete your Family Preparedness Plan at
+ weather.com/READY
+
+
+ Take frequent breaks when shoveling snow.
+
+
+ Heart attacks due to over exertion are a leading
+ cause of death during winter storms.
+
+
+ Allergies-
+
+
+ To reduce the severity of many allergy attacks on
+ airplane flights, use decongestant nose drops or
+ inhalers before a flight.
+
+
+ Allergies-
+
+
+ To reduce the number and severity of many allergy
+ attacks, attach Electrostatic filters to heating
+ and a/c equipment to remove allergens from the air.
+
+
diff --git a/webroot/js/newweathermanager.js b/webroot/js/newweathermanager.js
index 83e137e..2d7fabd 100644
--- a/webroot/js/newweathermanager.js
+++ b/webroot/js/newweathermanager.js
@@ -973,6 +973,33 @@ function grabAlamanacSlidesData() {
weatherInfo.alamanac.displayname = maincitycoords.displayname
weatherInfo.alamanac.noReport = true
});
+ var phasesfound = 0;
+ $.getJSON(`https://www.icalendar37.net/lunar/api/?lang=en&month=${dateFns.format(new Date(),"M")}&year=${dateFns.format(new Date(),"YYYY")}`, function(data) {
+ console.log('test')
+ for (phase in data.phase) {
+ console.log(phasesfound)
+ if (data.phase[phase].isPhaseLimit && phasesfound < 4 && phase > parseInt(dateFns.format(new Date(),"D"))) {
+ weatherInfo.alamanac.moonphases[phasesfound].name = {"new moon": "NEW", "first quarter": "FIRST", "full moon": "FULL", "last quarter": "LAST"}[(data.phase[phase].phaseName).toLowerCase()]
+ weatherInfo.alamanac.moonphases[phasesfound].date = String(data.monthName).slice(0,3) + " " + phase
+ phasesfound += 1;
+ }
+ }
+ if (phasesfound < 4) {
+ nextMonth()
+ }
+ })
+ function nextMonth() {
+ $.getJSON(`https://www.icalendar37.net/lunar/api/?lang=en&month=${dateFns.format((dateFns.addMonths(new Date(),1)),"M")}&year=${dateFns.format(dateFns.addMonths(new Date(),1),"YYYY")}`, function(data) {
+ for (phase in data.phase) {
+ if (data.phase[phase].isPhaseLimit && phasesfound < 4) {
+ console.log(phasesfound)
+ weatherInfo.alamanac.moonphases[phasesfound].name = {"new moon": "NEW", "first quarter": "FIRST", "full moon": "FULL", "last quarter": "LAST"}[(data.phase[phase].phaseName).toLowerCase()]
+ weatherInfo.alamanac.moonphases[phasesfound].date = String(data.monthName).slice(0,3) + " " + phase
+ phasesfound += 1;
+ }
+ }
+ })
+ }
}
function grabHealthData() {
$.getJSON('https://api.weather.com/v3/wx/forecast/daily/5day?geocode='+ maincitycoords.lat + ',' + maincitycoords.lon +"&format=json&language=en-US&units=e&apiKey=" + api_key, function(data) {
@@ -1115,7 +1142,7 @@ function grabAirportDelayData() {
airportdelay.iata = airportevent.airportId
airportdelay.type = 'Arrival'
airportdelay.amount = formatMinutes(airportevent.arrivalDelay.averageDelay)
- airportdelay.amountmin = airportevent.departureDelay.averageDelay
+ airportdelay.amountmin = airportevent.arrivalDelay.averageDelay
airportdelay.reason = airportevent.arrivalDelay.reason
weatherInfo.airport.delays.push(airportdelay)
}
diff --git a/webroot/js/slides-loop.js b/webroot/js/slides-loop.js
index d1d3a73..11e11a8 100644
--- a/webroot/js/slides-loop.js
+++ b/webroot/js/slides-loop.js
@@ -1438,6 +1438,31 @@ var mainMap
}
,healthtip() {
$('.info-slide.health .subhead-title').text('Weather Safety Tips');
+ const d = new Date();
+ let month = d.getMonth();
+ if (month > 4 && month < 8) {
+ $('.summertip').show();
+ } else if (month == 0) {
+ $('.flutip').show();
+ } else if (month == 1) {
+ $('.pipetip2').show();
+ } else if (month == 2) {
+ $('.wintertip2').show();
+ } else if (month == 3) {
+ $('.allergytip2').show();
+ } else if (month == 4) {
+ $('.drivingtip2').show();
+ } else if (month == 8) {
+ $('.drivingtip').show();
+ } else if (month == 9) {
+ $('.allergytip').show();
+ } else if (month == 10) {
+ $('.drivingtip').show();
+ } else if (month == 11) {
+ $('.flutip2').show();
+ } else {
+ $('.wintertip').show();
+ }
$('.info-slide-content.healthtip').fadeIn(500);
setTimeout(function() {
$('.info-slide-content.healthtip').fadeOut(500).promise().done(function(){
@@ -1903,6 +1928,19 @@ var mainMap
$('.info-slide-content.almanac .frost-pane.half .rlowyear').text(weatherInfo.alamanac.reclowyear);
$('.info-slide-content.almanac .frost-pane.purple .sunrisetext').text(weatherInfo.alamanac.sunrise);
$('.info-slide-content.almanac .frost-pane.purple .sunsettext').text(weatherInfo.alamanac.sunset);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.i .phasetext').text(weatherInfo.alamanac.moonphases[0].name);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.ii .phasetext').text(weatherInfo.alamanac.moonphases[1].name);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.iii .phasetext').text(weatherInfo.alamanac.moonphases[2].name);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.iv .phasetext').text(weatherInfo.alamanac.moonphases[3].name);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.i .date').text(weatherInfo.alamanac.moonphases[0].date);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.ii .date').text(weatherInfo.alamanac.moonphases[1].date);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.iii .date').text(weatherInfo.alamanac.moonphases[2].date);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.iv .date').text(weatherInfo.alamanac.moonphases[3].date);
+ $('.info-slide-content.almanac .frost-pane.purple .phase.i .icon').css('background-image', 'url("images/moonphases/' + weatherInfo.alamanac.moonphases[0].name + '.png")');
+ $('.info-slide-content.almanac .frost-pane.purple .phase.ii .icon').css('background-image', 'url("images/moonphases/' + weatherInfo.alamanac.moonphases[1].name + '.png")');
+ $('.info-slide-content.almanac .frost-pane.purple .phase.iii .icon').css('background-image', 'url("images/moonphases/' + weatherInfo.alamanac.moonphases[2].name + '.png")');
+ $('.info-slide-content.almanac .frost-pane.purple .phase.iv .icon').css('background-image', 'url("images/moonphases/' + weatherInfo.alamanac.moonphases[3].name + '.png")');
+
$('.city-info-slide').fadeIn(0);
$('.city-info-slide .subhead-title').text('Almanac');
$('.city-info-slide #subhead-city').text(weatherInfo.alamanac.displayname);