Fix weather icon

- Adds a drop-shadow filter to the OpenWeather icon so it can be seen in light mode
- Queries OpenWeather for the standard size icon instead of @2x
This commit is contained in:
Tressley Cahill
2022-11-04 20:55:39 -04:00
parent d6b5a034b2
commit 1b79b97c98
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ function weatherBalloon(cityID) {
let tempK = parseFloat(data.main.temp);
let tempC = Math.round(tempK - 273.15);
let tempF = Math.round((tempK - 273.15) * 1.8) + 32;
document.getElementById('weather').innerHTML = '<p id="location">' + data.name + '</p><p id="details" ' + 'title="' + tempF + '&deg;F">' + '<img src="http://openweathermap.org/img/wn/' + weatherIcon + '@2x.png">' + data.weather[0].description + '<span class="separator">|</span>' + tempC + '&deg;C</p>';
document.getElementById('weather').innerHTML = '<p id="location">' + data.name + '</p><p id="details" ' + 'title="' + tempF + '&deg;F">' + '<img src="http://openweathermap.org/img/wn/' + weatherIcon + '.png">' + data.weather[0].description + '<span class="separator">|</span>' + tempC + '&deg;C</p>';
});
}