From: Gabe Cook Date: Sat, 29 Aug 2020 07:43:02 +0000 (-0500) Subject: :wrench: Make stylesheet config be an array of files X-Git-Tag: v20.09.1~3^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=refs%2Fpull%2F113%2Fhead;hp=71cf63eb3bdeeced46e7eec4d62ef8cc4ca38800;p=github%2Fbastienwirtz%2Fhomer.git :wrench: Make stylesheet config be an array of files --- diff --git a/docs/configuration.md b/docs/configuration.md index f0b0a31..edcf1ed 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -27,8 +27,9 @@ connectivityCheck: true # whether you want to display a message when the apps ar theme: default # 'default' or one of the theme available in 'src/assets/themes'. # Optional custom stylesheet -# Will load a custom CSS file. Especially useful for custom icon sets. -# stylesheet: "assets/custom.css" +# Will load custom CSS files. Especially useful for custom icon sets. +# stylesheet: +# - "assets/custom.css" # Here is the exaustive list of customization parameters # However all value are optional and will fallback to default if not set. diff --git a/src/App.vue b/src/App.vue index 272b3f6..03760fd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -161,7 +161,11 @@ export default { this.services = this.config.services; document.title = `${this.config.title} | ${this.config.subtitle}`; if (this.config.stylesheet) { - this.createStylesheet(`@import "${this.config.stylesheet}";`); + let stylesheet = ''; + for (const file of this.config.stylesheet) { + stylesheet += `@import "${file}";`; + } + this.createStylesheet(stylesheet); } }, methods: {