diff --git a/index.html b/index.html index 5a46bb72..c9f2239c 100644 --- a/index.html +++ b/index.html @@ -1,55 +1,57 @@ - - MagicMirror² - - + + MagicMirror² + + - - - - + + + + - - - - + + + + - - - -
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
- - - - - - - - - - - - - - - + + + +
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/modules/default/weather/weather.js b/modules/default/weather/weather.js index 556c68a4..3386277c 100644 --- a/modules/default/weather/weather.js +++ b/modules/default/weather/weather.js @@ -33,7 +33,7 @@ Module.register("weather", { showIndoorHumidity: false, maxNumberOfDays: 5, maxEntries: 5, - ignoreToday: false, + ignoreToday: false, fade: true, fadePoint: 0.25, // Start on 1/4th of the list. initialLoadDelay: 0, // 0 seconds delay @@ -130,12 +130,12 @@ Module.register("weather", { // Add all the data to the template. getTemplateData: function () { - const forecast = this.weatherProvider.weatherForecast() + const forecast = this.weatherProvider.weatherForecast(); + + if (this.config.ignoreToday) { + forecast.splice(0, 1); + } - if (this.config.ignoreToday) { - forecast.splice(0, 1) - } - return { config: this.config, current: this.weatherProvider.currentWeather(), @@ -268,7 +268,7 @@ Module.register("weather", { this.nunjucksEnvironment().addFilter( "calcNumEntries", - function (dataArray) { + function (dataArray) { return Math.min(dataArray.length, this.config.maxEntries); }.bind(this) );