From a592ca25ffb7a578f36981e77ce27b16a47048d1 Mon Sep 17 00:00:00 2001 From: Andrew McOlash Date: Sun, 28 Aug 2016 01:52:08 -0500 Subject: [PATCH] Add in icon for the current humidity --- modules/default/currentweather/currentweather.css | 4 ++++ modules/default/currentweather/currentweather.js | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/default/currentweather/currentweather.css b/modules/default/currentweather/currentweather.css index 08c040d6..768b0f8d 100644 --- a/modules/default/currentweather/currentweather.css +++ b/modules/default/currentweather/currentweather.css @@ -7,6 +7,10 @@ transform: translate(0, -3px); } +.currentweather .humidityIcon { + padding-right: 8px; +} + .currentweather .humidity-padding { padding-bottom: 6px; } diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 57884ad7..87e4d04a 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -149,10 +149,15 @@ Module.register("currentweather",{ var middle = document.createElement("div"); middle.className = "normal small humidity-padding"; + var humidityIcon = document.createElement("span"); + humidityIcon.className = "wi wi-humidity humidityIcon"; + small.appendChild(sunriseSunsetIcon); + var humidity = document.createElement("span"); - humidity.innerHTML = "Humidity: " + this.humidity + "%"; // TODO: Localization + humidity.innerHTML = this.humidity + "%"; var br = document.createElement("br"); + middle.appendChild(humidityIcon); middle.appendChild(humidity); middle.appendChild(br); wrapper.appendChild(middle);