Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro committed May 27, 2019
1 parent 1946b14 commit 38d0fff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body {
border: 5px solid #009f9f;
border-radius: 20px;
line-height: 1.5;
margin: 1rem auto;
margin: 0.5rem auto;
min-width: 300px;
width: 80%;
text-align: center;
Expand Down Expand Up @@ -62,13 +62,13 @@ section .container {
}

.dspIcon {
display: none;
width: 5.5rem;
}

#dspWeather {
font-size: 1.25rem;
font-weight: bold;
margin-top: -1rem;
}

#dspTemp {
Expand Down
4 changes: 2 additions & 2 deletions js/localweather.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ async function getWeatherInfo(lat, lon) {
displayWeather(loc, icon, weather, temp, sunrise_time, sunset_time, wind);

} catch (ex) {
$('.dspIcon').css({'display': 'none'});
$('#dspWeather').css({'margin-top': 'auto'});
alert(`An error has occurred.\nPlease try again later.`);
}
}


function displayWeather(loc, icon, weather, temp, sunrise, sunset, wind) {
$("#dspLoc").html(loc);
$('.dspIcon').css({'display': 'inline'});
$(".dspIcon").attr("src", icon);
$("#dspWeather").css({'margin-top': '-1rem'});
$("#dspWeather").html(weather);
$("#dspTempValue").html(temp);
$("#dspSunriseTime").html(sunrise);
Expand Down

0 comments on commit 38d0fff

Please sign in to comment.