Home: More detailed cloud/rain icons

This commit is contained in:
nathan 2023-06-13 09:13:22 -06:00
parent 4c058ffc5f
commit 13981c5254

View File

@ -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']);
}