mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-01 19:09:30 +01:00
Home: More detailed cloud/rain icons
This commit is contained in:
parent
4c058ffc5f
commit
13981c5254
@ -239,6 +239,25 @@ class home_weather_portlet extends home_portlet
|
|||||||
case 'clear' :
|
case 'clear' :
|
||||||
$icon = 'sun';
|
$icon = 'sun';
|
||||||
break;
|
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:
|
default:
|
||||||
$icon = strtolower($weather['main']);
|
$icon = strtolower($weather['main']);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user