diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/App.vue | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/App.vue b/src/App.vue index 5f52c8f..03760fd 100644 --- a/src/App.vue +++ b/src/App.vue | |||
@@ -160,6 +160,13 @@ export default { | |||
160 | this.config = merge(defaults, config); | 160 | this.config = merge(defaults, config); |
161 | this.services = this.config.services; | 161 | this.services = this.config.services; |
162 | document.title = `${this.config.title} | ${this.config.subtitle}`; | 162 | document.title = `${this.config.title} | ${this.config.subtitle}`; |
163 | if (this.config.stylesheet) { | ||
164 | let stylesheet = ''; | ||
165 | for (const file of this.config.stylesheet) { | ||
166 | stylesheet += `@import "${file}";`; | ||
167 | } | ||
168 | this.createStylesheet(stylesheet); | ||
169 | } | ||
163 | }, | 170 | }, |
164 | methods: { | 171 | methods: { |
165 | getConfig: function (path = "assets/config.yml") { | 172 | getConfig: function (path = "assets/config.yml") { |
@@ -235,6 +242,11 @@ export default { | |||
235 | }, | 242 | }, |
236 | }; | 243 | }; |
237 | }, | 244 | }, |
245 | createStylesheet: function(css) { | ||
246 | let style = document.createElement('style'); | ||
247 | style.appendChild(document.createTextNode(css)); | ||
248 | document.head.appendChild(style); | ||
249 | }, | ||
238 | }, | 250 | }, |
239 | }; | 251 | }; |
240 | </script> | 252 | </script> |