Added OpenWeatherMap mappings, updated Yahoo Weather and Forecast.io mappings.
parent
c65cd7f74f
commit
3088bdb699
@ -0,0 +1,97 @@
|
||||
// icon definitions
|
||||
// --------------------------
|
||||
|
||||
@owm-mapping-namespace: owm;
|
||||
|
||||
// create the icon definitions
|
||||
@owm-condition-code-mappings:
|
||||
200 "storm-showers",
|
||||
201 "storm-showers",
|
||||
202 "thunderstorm",
|
||||
210 "storm-showers",
|
||||
211 "storm-showers",
|
||||
212 "thunderstorm",
|
||||
221 "storm-showers",
|
||||
230 "storm-showers",
|
||||
231 "storm-showers",
|
||||
232 "storm-showers",
|
||||
300 "sprinkle",
|
||||
301 "showers",
|
||||
302 "showers",
|
||||
310 "rain-mix",
|
||||
311 "rain-mix",
|
||||
312 "rain-mix",
|
||||
313 "rain-mix",
|
||||
314 "rain-mix",
|
||||
321 "showers",
|
||||
500 "showers",
|
||||
501 "rain",
|
||||
502 "rain",
|
||||
503 "rain",
|
||||
504 "rain",
|
||||
511 "sleet",
|
||||
520 "rain-mix",
|
||||
521 "rain-mix",
|
||||
522 "showers",
|
||||
531 "showers",
|
||||
600 "snow",
|
||||
601 "snow",
|
||||
602 "snow",
|
||||
611 "sleet",
|
||||
612 "sleet",
|
||||
615 "rain-mix",
|
||||
616 "rain-mix",
|
||||
620 "rain-mix",
|
||||
621 "rain-mix",
|
||||
622 "rain-mix",
|
||||
701 "sprinkles",
|
||||
711 "smoke",
|
||||
721 "day-haze",
|
||||
731 "dust",
|
||||
741 "fog",
|
||||
751 "dust",
|
||||
761 "dust",
|
||||
762 "dust",
|
||||
771 "strong-wind",
|
||||
781 "tornado",
|
||||
800 "day-sunny",
|
||||
801 "day-cloudy",
|
||||
802 "day-cloudy",
|
||||
803 "day-cloudy",
|
||||
804 "cloudy",
|
||||
900 "tornado",
|
||||
901 "hurricane",
|
||||
902 "hurricane",
|
||||
903 "snowflake-cold",
|
||||
904 "hot",
|
||||
905 "windy",
|
||||
906 "hail",
|
||||
951 "beaufort-0",
|
||||
952 "beaufort-2",
|
||||
953 "beaufort-3",
|
||||
954 "beaufort-4",
|
||||
955 "beaufort-5",
|
||||
956 "beaufort-6",
|
||||
957 "beaufort-7",
|
||||
958 "beaufort-8",
|
||||
959 "beaufort-9",
|
||||
960 "beaufort-10",
|
||||
961 "beaufort-11",
|
||||
962 "beaufort-12";
|
||||
|
||||
// generate condition code mapping classes and @extend the matching class
|
||||
// todo: extend() doesn't seem to function...
|
||||
.createOWMMappings(@iterator: 1) when(@iterator <= length(@owm-condition-code-mappings)) {
|
||||
|
||||
@owm-condition-code: extract(extract(@owm-condition-code-mappings, @iterator), 1);
|
||||
@owm-condition-code-mapping: extract(extract(@owm-condition-code-mappings, @iterator), 2);
|
||||
@owm-condition-code-mapping-unquoted: ~"@{owm-condition-code-mapping}";
|
||||
|
||||
.@{wi-css-prefix}-@{owm-mapping-namespace}-@{owm-condition-code}:before {
|
||||
|
||||
&:extend(.@{wi-css-prefix}-@{owm-condition-code-mapping-unquoted}:before all);
|
||||
}
|
||||
|
||||
.createOWMMappings((@iterator + 1));
|
||||
}
|
||||
.createOWMMappings();
|
@ -0,0 +1,90 @@
|
||||
// icon definitions
|
||||
// --------------------------
|
||||
|
||||
$owm-mapping-namespace: owm;
|
||||
|
||||
// create the icon definitions
|
||||
$owm-condition-code-mappings: (
|
||||
200: "storm-showers",
|
||||
201: "storm-showers",
|
||||
202: "thunderstorm",
|
||||
210: "storm-showers",
|
||||
211: "storm-showers",
|
||||
212: "thunderstorm",
|
||||
221: "storm-showers",
|
||||
230: "storm-showers",
|
||||
231: "storm-showers",
|
||||
232: "storm-showers",
|
||||
300: "sprinkle",
|
||||
301: "showers",
|
||||
302: "showers",
|
||||
310: "rain-mix",
|
||||
311: "rain-mix",
|
||||
312: "rain-mix",
|
||||
313: "rain-mix",
|
||||
314: "rain-mix",
|
||||
321: "showers",
|
||||
500: "showers",
|
||||
501: "rain",
|
||||
502: "rain",
|
||||
503: "rain",
|
||||
504: "rain",
|
||||
511: "sleet",
|
||||
520: "rain-mix",
|
||||
521: "rain-mix",
|
||||
522: "showers",
|
||||
531: "showers",
|
||||
600: "snow",
|
||||
601: "snow",
|
||||
602: "snow",
|
||||
611: "sleet",
|
||||
612: "sleet",
|
||||
615: "rain-mix",
|
||||
616: "rain-mix",
|
||||
620: "rain-mix",
|
||||
621: "rain-mix",
|
||||
622: "rain-mix",
|
||||
701: "sprinkles",
|
||||
711: "smoke",
|
||||
721: "day-haze",
|
||||
731: "dust",
|
||||
741: "fog",
|
||||
751: "dust",
|
||||
761: "dust",
|
||||
762: "dust",
|
||||
771: "strong-wind",
|
||||
781: "tornado",
|
||||
800: "day-sunny",
|
||||
801: "day-cloudy",
|
||||
802: "day-cloudy",
|
||||
803: "day-cloudy",
|
||||
804: "cloudy",
|
||||
900: "tornado",
|
||||
901: "hurricane",
|
||||
902: "hurricane",
|
||||
903: "snowflake-cold",
|
||||
904: "hot",
|
||||
905: "windy",
|
||||
906: "hail",
|
||||
951: "beaufort-0",
|
||||
952: "beaufort-2",
|
||||
953: "beaufort-3",
|
||||
954: "beaufort-4",
|
||||
955: "beaufort-5",
|
||||
956: "beaufort-6",
|
||||
957: "beaufort-7",
|
||||
958: "beaufort-8",
|
||||
959: "beaufort-9",
|
||||
960: "beaufort-10",
|
||||
961: "beaufort-11",
|
||||
962: "beaufort-12"
|
||||
);
|
||||
|
||||
// generate condition code mapping classes and @extend the matching class
|
||||
@each $owm-condition-code, $owm-condition-code-mapping in $owm-condition-code-mappings {
|
||||
|
||||
.#{$wi-css-prefix}-#{$owm-mapping-namespace}-#{$owm-condition-code}:before {
|
||||
|
||||
@extend .#{$wi-css-prefix}-#{$owm-condition-code-mapping};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue