Skip to content

Commit

Permalink
Fix: Enhanced app homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Mar 27, 2024
1 parent 3e3c16d commit 888ae7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ html {
}

body {
background-image: url("/utils/clouds.jpg");
background-image: url("/WeatherMate-App/utils/clouds.jpg");
font-family: "Poppins", sans-serif;
display: flex;
flex-direction: column;
Expand Down
14 changes: 7 additions & 7 deletions src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,32 +182,32 @@ function setBackground(condition, data) {
const sunset = data.sys.sunset;

if (condition === 'Clear' && (currentTime < sunrise || currentTime > sunset)) {
backgroundImage = 'url(/utils/night.jpg)';
backgroundImage = 'url(/WeatherMate-App/utils/night.jpg)';
textColor = 'white';
favoriteColor = 'black';
}
else {
switch (condition) {
case 'Clouds':
backgroundImage = 'url(/utils/cloudy.jpg)';
backgroundImage = 'url(/WeatherMate-App/utils/cloudy.jpg)';
textColor = 'black';
favoriteColor = 'black';
document.getElementById('my-heading').style.color = 'white !important';
break;
case 'Clear':
backgroundImage = 'url(/utils/clear.jpg)';
backgroundImage = 'url(/WeatherMate-App/utils/clear.jpg)';
break;
case 'Rain':
backgroundImage = 'url(/utils/rainy.jpg)';
backgroundImage = 'url(/WeatherMate-App/utils/rainy.jpg)';
break;
case 'Snow':
backgroundImage = 'url(/utils/snowy.jpg)';
backgroundImage = 'url(/WeatherMate-App/utils/snowy.jpg)';
break;
case 'Thunderstorm':
backgroundImage = 'url(/utils/thunderstorm.jpg)';
backgroundImage = 'url(/WeatherMate-App/utils/thunderstorm.jpg)';
break;
default:
backgroundImage = 'url(/utils/clouds.jpg)';
backgroundImage = 'url(/WeatherMate-App/utils/clouds.jpg)';
break;
}
}
Expand Down

0 comments on commit 888ae7f

Please sign in to comment.