From d3716ede70ab89ee0048340bc87dc2b5cbe9b606 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Fri, 25 Sep 2020 22:29:58 -0600 Subject: [PATCH] Increase readability --- www/assets/js/toolbox_weather.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/www/assets/js/toolbox_weather.js b/www/assets/js/toolbox_weather.js index c9f1a7e..95de1d7 100644 --- a/www/assets/js/toolbox_weather.js +++ b/www/assets/js/toolbox_weather.js @@ -202,8 +202,10 @@ function loadWeather(reload) { temps: low + " to " + high, uv_index: resp.forecast[i].uv_index, uv_color: uvIndexToColor(resp.forecast[i].uv_index), + uv_foreground: uvIndexToColor(resp.forecast[i].uv_index) == "yellow" ? "black" : "white", precip_chance: Math.round(resp.forecast[i].precipitation.chance * 100), - precip_color: precipcolor + precip_color: precipcolor, + precip_foreground: precipcolor == "lightblue" ? "black" : "white" }); } @@ -213,8 +215,8 @@ function loadWeather(reload) { + '
' + '
{{day}}
' + ' {{temps}}' - + '
{{uv_index}}' - + '   {{precip_chance}}%' + + '
{{uv_index}}' + + '   {{precip_chance}}%' + '
' + ' ' + ''