X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FApp.vue;h=d97df0cc18d1f5ad5ff1af3ba5f8c8b1a059619c;hb=d1b29caaa62ef19e9dd68babf334ec25a966f945;hp=5f52c8f2fd40e017937e9b8b837cebcf2bfa05f4;hpb=607fb898f882a6086904b0b530215425fbcf5f41;p=github%2Fbastienwirtz%2Fhomer.git
diff --git a/src/App.vue b/src/App.vue
index 5f52c8f..d97df0c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -26,7 +26,7 @@
@@ -40,9 +40,9 @@
@@ -51,7 +51,7 @@
@@ -159,7 +159,16 @@ export default {
}
this.config = merge(defaults, config);
this.services = this.config.services;
- document.title = `${this.config.title} | ${this.config.subtitle}`;
+ document.title =
+ this.config.documentTitle ||
+ `${this.config.title} | ${this.config.subtitle}`;
+ if (this.config.stylesheet) {
+ let stylesheet = "";
+ for (const file of this.config.stylesheet) {
+ stylesheet += `@import "${file}";`;
+ }
+ this.createStylesheet(stylesheet);
+ }
},
methods: {
getConfig: function (path = "assets/config.yml") {
@@ -235,6 +244,11 @@ export default {
},
};
},
+ createStylesheet: function (css) {
+ let style = document.createElement("style");
+ style.appendChild(document.createTextNode(css));
+ document.head.appendChild(style);
+ },
},
};