Skip to content

Commit

Permalink
additional tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Morozov committed Dec 20, 2016
1 parent 972201f commit 13ff8b7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions MMM-forecast-io.js
Expand Up @@ -161,7 +161,7 @@ Module.register("MMM-forecast-io", {
large.appendChild(temperature);

var extras = document.createElement("div");
extras.className = "small dimmed";
extras.className = "small dimmed extras";

var sunriseIcon = document.createElement("span");
sunriseIcon.className = "wi wi-sunrise";
Expand All @@ -176,27 +176,31 @@ Module.register("MMM-forecast-io", {
extras.appendChild(sunsetIcon);

var sunsetTime = document.createElement("span");
sunsetTime.innerHTML = moment(new Date(daily.data[0].sunsetTime * 1000)).format(' h:mma ');
sunsetTime.innerHTML = moment(new Date(daily.data[0].sunsetTime * 1000)).format(' h:mma ');
extras.appendChild(sunsetTime);

var extras2 = document.createElement("div");
extras2.className = "small dimmed extras2";

var windBearing = document.createElement("span");
windBearing.className = "wi wi-wind from-" + Math.round(currentWeather.windBearing) + "-deg";
extras.appendChild(windBearing);
extras2.appendChild(windBearing);

var windSpeed = document.createElement("span");
windSpeed.innerHTML = " " + Math.round(currentWeather.windSpeed) + "mph";
windSpeed.appendChild
extras.appendChild(windSpeed);
extras2.appendChild(windSpeed);


var summaryText = minutely ? minutely.summary : hourly.summary;
var summary = document.createElement("div");
summary.className = "small dimmed summary";
summary.className = "small summary";
summary.innerHTML = summaryText;

wrapper.appendChild(large);
wrapper.appendChild(summary);
wrapper.appendChild(extras);
wrapper.appendChild(extras2);

if (this.config.showPrecipitationGraph &&
this.isAnyPrecipitation(minutely)) {
Expand Down

0 comments on commit 13ff8b7

Please sign in to comment.