diff --git a/INFO.md b/INFO.md deleted file mode 100644 index 4d6d602..0000000 --- a/INFO.md +++ /dev/null @@ -1 +0,0 @@ -This is the live preview version of the web-app for Github Pages. \ No newline at end of file diff --git a/README.md b/README.md index 509ee57..6d3e977 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,9 @@ The app pulls data from the [Dark Sky API](http://darksky.net/dev) and provides: ### Current Version -The current release is [v1.1.4](https://github.com/davidtaylorjr/local-weather-webapp/releases/latest) and is on a steady development cycle. + +The current release is [v1.2.0](https://github.com/davidtaylorjr/local-weather-webapp/releases/latest) and is on a steady development cycle. + ### Future Feature Plans diff --git a/css/stylesheet.css b/css/stylesheet.css index f77f211..9e6e491 100644 --- a/css/stylesheet.css +++ b/css/stylesheet.css @@ -2,6 +2,11 @@ html { background: #323232; } +a { + color: #254ae6 !important; + text-decoration: none; +} + #pgtitle { font-family: sans-serif; text-align: center; @@ -9,6 +14,10 @@ html { margin-top: 8% 0 0 0; } +#alert { + color: rgb(100%, 0%, 0%); +} + #out { color: #ffffff; text-align: center; @@ -102,4 +111,4 @@ footer { #copyright { font-family: Arial, Helvetica, sans-serif; text-align: center; -} \ No newline at end of file +} diff --git a/index.html b/index.html index 35c7a09..7817d79 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,8 @@ +
+

Your Local Weather

@@ -26,13 +28,7 @@

Your Local Weather

- +
diff --git a/scripts/javascript.js b/scripts/javascript.js index 646fd8c..9477d4e 100644 --- a/scripts/javascript.js +++ b/scripts/javascript.js @@ -13,7 +13,11 @@ function geoLocation() { //Google Maps API to return printed location as opposed to lat/lon coordinates. +<<<<<<< HEAD $.getJSON('https://maps.googleapis.com/maps/api/geocode/json?latlng=' + latitude + ',' + longitude + '&key=YOUR-API-KEY', function(city) { +======= + $.getJSON('https://maps.googleapis.com/maps/api/geocode/json?latlng=' + latitude + ',' + longitude + '&key=Your-API-Key', function(city) { +>>>>>>> staging var address = city.results[2].formatted_address; @@ -27,7 +31,11 @@ function geoLocation() { //current conditions api from Darksky.net and variables for printing inside app. $.ajax({ +<<<<<<< HEAD url: 'https://api.darksky.net/forecast/YOUR-API-KEY/' + latitude + ',' + longitude + "?units=us", +======= + url: 'https://api.darksky.net/forecast/Your-API-Key/' + latitude + ',' + longitude + "?units=us", +>>>>>>> staging dataType: "jsonp", success: function(data) { @@ -38,6 +46,14 @@ function geoLocation() { var celsius = Math.round((temp - 32) * (5 / 9)); var tempFeel = data.currently.apparentTemperature; var tempFeelCelsius = Math.round((tempFeel - 32) * (5 / 9)); + var forecast = data.daily.summary; + + if (data.hasOwnProperty("alerts")) { + var severe = data.alerts; + var severeAlert = data.alerts.title; + window.severe = severe; + alert(severeAlert); + } window.temp = temp; @@ -46,6 +62,7 @@ function geoLocation() { window.tempFeel = tempFeel; window.tempFeelCelsius = tempFeelCelsius; + console.log(data); var current = document.getElementById(conditions); @@ -73,30 +90,30 @@ function geoLocation() { case 'clear-night': case 'clear-day': return weathercon.innerHTML = '
'; - break; + case 'rain': return weathercon.innerHTML = '
'; - break; + case 'thunderstorm': case 'hail': return weathercon.innerHTML = '
'; - break; + case 'cloudy': case 'fog': case 'windy': return weathercon.innerHTML = '
'; - break; + case 'snow': case 'sleet': return weathercon.innerHTML = '
'; - break; + case 'partly-cloudy-day': case 'partly-cloudy-night': return weathercon.innerHTML = '
'; - break; + case 'tornado': return weathercon.innerHTML = '
'; - break; + default: