diff --git a/MMM-DarkSkyForecast.css b/MMM-DarkSkyForecast.css index b90fbae..8f2a92e 100644 --- a/MMM-DarkSkyForecast.css +++ b/MMM-DarkSkyForecast.css @@ -77,6 +77,20 @@ margin: 15px 0; } +/* Module Header below current conditions */ + +.MMM-DarkSkyForecast .module-header { + text-transform: uppercase; + font-size: 15px; + font-family: "Roboto Condensed", Arial, Helvetica, sans-serif; + font-weight: 400; + border-bottom: 1px solid #666; + line-height: 15px; + padding-bottom: 5px; + padding-top: 5px; + margin-bottom: 10px; + color: #999; +} /* ------------ Forecast ------------ */ diff --git a/MMM-DarkSkyForecast.js b/MMM-DarkSkyForecast.js index d561fb1..48a31f6 100644 --- a/MMM-DarkSkyForecast.js +++ b/MMM-DarkSkyForecast.js @@ -10,6 +10,8 @@ Module.register("MMM-DarkSkyForecast", { showCurrentConditions: true, showExtraCurrentConditions: true, showSummary: true, + forecastTableHeaderText: '', + showForecastTableColumnHeaderIcons: true, showHourlyForecast: true, hourlyForecastInterval: 3, maxHourliesToShow: 3, @@ -306,8 +308,14 @@ Module.register("MMM-DarkSkyForecast", { summaryWrapper.appendChild(summary); wrapper.appendChild(summaryWrapper); - - + } + + //forecastTableHeaderText + if (this.config.forecastTableHeaderText != "") { + var forecastHeader = document.createElement("div"); + forecastHeader.className = "module-header"; + forecastHeader.innerHTML = this.config.forecastTableHeaderText; + wrapper.appendChild(forecastHeader); } var forecastWrapper; @@ -315,7 +323,7 @@ Module.register("MMM-DarkSkyForecast", { forecastWrapper = document.createElement("div"); forecastWrapper.className = "forecast-container"; - if (this.config.forecastLayout == "table") { + if (this.config.forecastLayout == "table" && this.config.showForecastTableColumnHeaderIcons) { var headerRow = document.createElement("div"); headerRow.className = "header-row"; @@ -694,4 +702,4 @@ Module.register("MMM-DarkSkyForecast", { } -}); \ No newline at end of file +}); diff --git a/README.md b/README.md index 345b35c..5c28658 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,14 @@ Find out your latitude and longitude here: showSummary Whether to show the forecast summary.

Type Boolean
Defaults to true + + forecastTableHeaderText + Show a header above the forecast table. Can be used instead of the regular header.

Type String
Defaults to '' + + + showForecastTableColumnHeaderIcons + Whether to show icons for the columns of the forecast table.

Type Boolean
Defaults to true + showHourlyForecast Whether to show hourly forecast information. when set to true it works with the hourlyForecastInterval and maxHourliesToShow parameters.

Type Boolean
Defaults to true @@ -131,7 +139,7 @@ Find out your latitude and longitude here: forecastLayout - Can be set to tiled or table. How to display hourly and forecast information. See below for screenshot examples of each.

Type String
Defaults to true + Can be set to tiled or table. How to display hourly and forecast information. See below for screenshot examples of each.

Type String
Defaults to tiled label_maximum @@ -147,7 +155,7 @@ Find out your latitude and longitude here: label_timeFormat - How you want the time formatted for hourly forecast display. Accepts any valid moment.js format (https://momentjs.com/docs/#/displaying/format/).

Type String
Defaults to "h a" (e.g.: 9 am) + How you want the time formatted for hourly forecast display. Accepts any valid moment.js format (https://momentjs.com/docs/#/displaying/format/).
The short 24h format kann be displayed by "k[h]" (e.g.: 14h)

Type String
Defaults to "h a" (e.g.: 9 am) label_days @@ -188,4 +196,4 @@ Find out your latitude and longitude here: ## Layouts -![Layouts](/../screenshots/forecast-layouts.png?raw=true "Layouts") \ No newline at end of file +![Layouts](/../screenshots/forecast-layouts.png?raw=true "Layouts")