Skip to content

Commit

Permalink
changes made to styling
Browse files Browse the repository at this point in the history
  • Loading branch information
yashcrest committed Aug 3, 2023
1 parent fe0a5d6 commit 6504726
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ body{
}

.flex .description {
margin-bottom: 0p;
margin-bottom: 0px;
}

.celcius{
Expand Down
3 changes: 1 addition & 2 deletions weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ let weather = {
.then((res) => res.json())
.then((data) =>{
this.displayWeather(data);
console.log(data);
})
.catch((error) => console.log("There was error fetching: " + error))
},
displayWeather: function(data) {
const { name } = data.location;
const {text, icon} = data.current.condition;
const {temp_c, humidity, wind_kph} = data.current;
console.log(data);
console.log(name, icon, text, temp_c, humidity);
document.querySelector(".city").textContent = "Weather in " + name;
document.querySelector(".weatherImg").src = icon;
document.querySelector(".celcius").innerHTML = temp_c + "°C";
Expand Down

0 comments on commit 6504726

Please sign in to comment.