aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-09-04 15:43:44 -0700
committerBastien Wirtz <bastien.wirtz@gmail.com>2020-09-04 15:52:34 -0700
commitffe3404a2a9b36d69e880baa224375e82e64ae54 (patch)
treead3c0ed9351dd16aa0a4458059d0f1f44c8ebb12
parentbcf0e1bec2ea2b55def5e4377dc03d4fc6f3b928 (diff)
downloadhomer-ffe3404a2a9b36d69e880baa224375e82e64ae54.tar.gz
homer-ffe3404a2a9b36d69e880baa224375e82e64ae54.tar.zst
homer-ffe3404a2a9b36d69e880baa224375e82e64ae54.zip
Simplify service structure
-rw-r--r--docs/configuration.md2
-rw-r--r--public/assets/custom.css.sample3
-rw-r--r--src/App.vue6
-rw-r--r--src/components/Service.vue17
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`
13 13
14title: "App dashboard" 14title: "App dashboard"
15subtitle: "Homer" 15subtitle: "Homer"
16logo: "assets/homer.png" 16logo: "assets/logo.png"
17# Alternatively a fa icon can be provided: 17# Alternatively a fa icon can be provided:
18# icon: "fas fa-skull-crossbones" 18# icon: "fas fa-skull-crossbones"
19 19
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 @@
2 2
3/* Custom card colors */ 3/* Custom card colors */
4/* Use with `class:` property of services in config.yml */ 4/* Use with `class:` property of services in config.yml */
5body #app .card .green 5body #app .card.green {
6{
7 background-color: #006600; 6 background-color: #006600;
8 color: #00ff00; 7 color: #00ff00;
9} 8}
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 {
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) { 163 if (this.config.stylesheet) {
164 let stylesheet = ''; 164 let stylesheet = "";
165 for (const file of this.config.stylesheet) { 165 for (const file of this.config.stylesheet) {
166 stylesheet += `@import "${file}";`; 166 stylesheet += `@import "${file}";`;
167 } 167 }
@@ -242,8 +242,8 @@ export default {
242 }, 242 },
243 }; 243 };
244 }, 244 },
245 createStylesheet: function(css) { 245 createStylesheet: function (css) {
246 let style = document.createElement('style'); 246 let style = document.createElement("style");
247 style.appendChild(document.createTextNode(css)); 247 style.appendChild(document.createTextNode(css));
248 document.head.appendChild(style); 248 document.head.appendChild(style);
249 }, 249 },
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 @@
1<template> 1<template>
2 <div> 2 <div>
3 <div class="card"> 3 <div class="card" :class="item.class">
4 <a :href="item.url" :target="item.target" rel="noreferrer"> 4 <a :href="item.url" :target="item.target" rel="noreferrer">
5 <div 5 <div class="card-content">
6 class="card-content"
7 :class="item.class"
8 >
9 <div class="media"> 6 <div class="media">
10 <div v-if="item.logo" class="media-left"> 7 <div v-if="item.logo" class="media-left">
11 <figure class="image is-48x48"> 8 <figure class="image is-48x48">
@@ -18,14 +15,8 @@
18 </figure> 15 </figure>
19 </div> 16 </div>
20 <div class="media-content"> 17 <div class="media-content">
21 <p 18 <p class="title is-4">{{ item.name }}</p>
22 class="title is-4" 19 <p class="subtitle is-6">{{ item.subtitle }}</p>
23 :class="item.class"
24 >{{ item.name }}</p>
25 <p
26 class="subtitle is-6"
27 :class="item.class"
28 >{{ item.subtitle }}</p>
29 </div> 20 </div>
30 </div> 21 </div>
31 <div class="tag" :class="item.tagstyle" v-if="item.tag"> 22 <div class="tag" :class="item.tagstyle" v-if="item.tag">