From 0bb52a605825b36ed79a28115fab353f04690023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20L=C3=B6bel?= Date: Fri, 19 May 2017 19:54:43 +0200 Subject: [PATCH] #891 Added ability to change the custom.css path. --- CHANGELOG.md | 1 + README.md | 2 +- js/defaults.js | 1 + js/loader.js | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3626334a..882c4390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Add test for check if exits the directories present in defaults modules. - Add calendar option to set a separate date format for full day events. - Add ability for `currentweather` module to display indoor temperature via INDOOR_TEMPERATURE notification +- Add ability to change the path of the `custom.css`. ### Updated - Added missing keys to Polish translation. diff --git a/README.md b/README.md index c19ee20f..8b0c66be 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ The following properties can be configured: | `units` | The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. The default is `metric`. | | `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** | | `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `kiosk = true`, `autoHideMenuBar = false` and `fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). | - +| `customCss` | The path of the `custom.css` stylesheet. The default is `css/custom.css`. | Module configuration: diff --git a/js/defaults.js b/js/defaults.js index 66926de7..eada87a4 100644 --- a/js/defaults.js +++ b/js/defaults.js @@ -21,6 +21,7 @@ var defaults = { timeFormat: 24, units: "metric", zoom: 1, + customCss: "css/custom.css", modules: [ { diff --git a/js/loader.js b/js/loader.js index 42b42952..a753df52 100644 --- a/js/loader.js +++ b/js/loader.js @@ -35,7 +35,7 @@ var Loader = (function() { // This is done after all the moduels so we can // overwrite all the defined styls. - loadFile("css/custom.css", function() { + loadFile(config.customCss, function() { // custom.css loaded. Start all modules. startModules(); });