From ffe3404a2a9b36d69e880baa224375e82e64ae54 Mon Sep 17 00:00:00 2001 From: Bastien Wirtz Date: Fri, 4 Sep 2020 15:43:44 -0700 Subject: [PATCH] Simplify service structure --- docs/configuration.md | 2 +- public/assets/custom.css.sample | 3 +-- src/App.vue | 6 +++--- src/components/Service.vue | 17 ++++------------- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 22f50fc..d1c8e6b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -13,7 +13,7 @@ Title, icons, links, colors, and services can be configured in the `config.yml` title: "App dashboard" subtitle: "Homer" -logo: "assets/homer.png" +logo: "assets/logo.png" # Alternatively a fa icon can be provided: # icon: "fas fa-skull-crossbones" diff --git a/public/assets/custom.css.sample b/public/assets/custom.css.sample index 2465757..00658d7 100644 --- a/public/assets/custom.css.sample +++ b/public/assets/custom.css.sample @@ -2,8 +2,7 @@ /* Custom card colors */ /* Use with `class:` property of services in config.yml */ -body #app .card .green -{ +body #app .card.green { background-color: #006600; color: #00ff00; } diff --git a/src/App.vue b/src/App.vue index 03760fd..eb132d0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -161,7 +161,7 @@ export default { this.services = this.config.services; document.title = `${this.config.title} | ${this.config.subtitle}`; if (this.config.stylesheet) { - let stylesheet = ''; + let stylesheet = ""; for (const file of this.config.stylesheet) { stylesheet += `@import "${file}";`; } @@ -242,8 +242,8 @@ export default { }, }; }, - createStylesheet: function(css) { - let style = document.createElement('style'); + createStylesheet: function (css) { + let style = document.createElement("style"); style.appendChild(document.createTextNode(css)); document.head.appendChild(style); }, diff --git a/src/components/Service.vue b/src/components/Service.vue index 4e35b7d..59fdf17 100644 --- a/src/components/Service.vue +++ b/src/components/Service.vue @@ -1,11 +1,8 @@