From 13981c5254c54d077e86af4c80d7c6c10f1f13b9 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 13 Jun 2023 09:13:22 -0600 Subject: [PATCH] Home: More detailed cloud/rain icons --- home/inc/class.home_weather_portlet.inc.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/home/inc/class.home_weather_portlet.inc.php b/home/inc/class.home_weather_portlet.inc.php index 5085d35b7e..96d0122fdb 100644 --- a/home/inc/class.home_weather_portlet.inc.php +++ b/home/inc/class.home_weather_portlet.inc.php @@ -239,6 +239,25 @@ class home_weather_portlet extends home_portlet case 'clear' : $icon = 'sun'; break; + case 'clouds': + $icon = strtolower($weather['main']); + if($weather['description'] == 'broken clouds') + { + $icon = 'cloud-sun'; + } + break; + case 'rain': + $icon = 'cloud-rain'; + if(str_contains($weather['description'], 'heavy')) + { + $icon = 'cloud-rain-heavy'; + } + elseif(str_contains($weather['description'], 'light')) + { + $icon = 'cloud-drizzle'; + + } + break; default: $icon = strtolower($weather['main']); }