Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaylorjr committed Jan 18, 2017
2 parents dab06e6 + 58ceee3 commit 9d51837
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 17 deletions.
1 change: 0 additions & 1 deletion INFO.md

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@ html {
background: #323232;
}

a {
color: #254ae6 !important;
text-decoration: none;
}

#pgtitle {
font-family: sans-serif;
text-align: center;
color: #ffffff;
margin-top: 8% 0 0 0;
}

#alert {
color: rgb(100%, 0%, 0%);
}

#out {
color: #ffffff;
text-align: center;
Expand Down Expand Up @@ -102,4 +111,4 @@ footer {
#copyright {
font-family: Arial, Helvetica, sans-serif;
text-align: center;
}
}
10 changes: 3 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
</head>

<body onload="javascript:geoLocation()">
<div id="alert">
</div>
<h1 id="pgtitle">Your Local Weather</h1>
<div style="text-align:center;" id="locbtn">
<!--<button type="button" onclick="geoLocation()">Find Location</button> -->
Expand All @@ -26,13 +28,7 @@ <h1 id="pgtitle">Your Local Weather</h1>
</div>
<div id="twentyfour">
</div>
<!--
Below is an example of the css for the weather icons.
<div class="icon">
<div class="cloud"></div>
<div class="cloud"></div>
</div>
-->


<div id="weathercon">

Expand Down
31 changes: 24 additions & 7 deletions scripts/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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) {

Expand All @@ -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;
Expand All @@ -46,6 +62,7 @@ function geoLocation() {
window.tempFeel = tempFeel;
window.tempFeelCelsius = tempFeelCelsius;


console.log(data);

var current = document.getElementById(conditions);
Expand Down Expand Up @@ -73,30 +90,30 @@ function geoLocation() {
case 'clear-night':
case 'clear-day':
return weathercon.innerHTML = '<div class="sun"><div class=rays></div></div>';
break;

case 'rain':
return weathercon.innerHTML = '<div class="cloud"><div class="rain"></div></div>';
break;

case 'thunderstorm':
case 'hail':
return weathercon.innerHTML = '<div class="cloud"><div class ="lightning"><div class="bolt"></div><div class="bolt"></div></div>';
break;

case 'cloudy':
case 'fog':
case 'windy':
return weathercon.innerHTML = '<div class="cloud"></div><div class="cloud"></div>';
break;

case 'snow':
case 'sleet':
return weathercon.innerHTML = '<div class="cloud"><div class="snow"><div class="flake"></div><div class="flake"></div></div></div>';
break;

case 'partly-cloudy-day':
case 'partly-cloudy-night':
return weathercon.innerHTML = '<div class="cloud"></div><div class="sun"><div class="rays"></div></div>';
break;

case 'tornado':
return weathercon.innerHTML = '<div class="cloud"><div class ="lightning"><div class="bolt"></div><div class="bolt"></div></div></div><div class="cloud"></div>';
break;


default:

Expand Down

0 comments on commit 9d51837

Please sign in to comment.