Created
March 9, 2018 23:24
-
-
Save parzibyte/b55aeddcee015a13ded544d3c5542777 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
icono(){ | |
let clase = { | |
'wi': true, | |
'display-4': true | |
}, | |
esDeDia = this.esDeDia(), | |
icono = ""; | |
switch (this.clima.weather[0].main.toLowerCase()) { | |
case 'clouds': | |
icono = esDeDia ? 'wi-day-cloudy' : 'wi-night-cloudy'; | |
break; | |
case 'clear': | |
icono = esDeDia ? 'wi-day-sunny' : 'wi-night-clear'; | |
break; | |
case 'drizzle': | |
icono = esDeDia ? 'wi-day-rain-mix' : 'wi-night-rain-mix'; | |
break; | |
case 'rain': | |
icono = esDeDia ? 'wi-day-rain' : 'wi-night-rain'; | |
break; | |
case 'snow': | |
icono = esDeDia ? 'wi-day-snow' : 'wi-night-snow'; | |
break; | |
case 'thunderstorm': | |
icono = esDeDia ? 'wi-day-thunderstorm' : 'wi-night-thunderstorm'; | |
break; | |
} | |
clase[icono] = true; | |
return clase; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment