aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-09-04 15:30:01 -0700
committerGitHub <noreply@github.com>2020-09-04 15:30:01 -0700
commitbcf0e1bec2ea2b55def5e4377dc03d4fc6f3b928 (patch)
tree3735dfbddb08b08e8dfac8e47a52763d26e2a788
parent83665e4f48e8db29d74a2e84b8befb6076c08665 (diff)
parente9afa4d7dd68e43bafcc4fd75c01bbaf0e6401ce (diff)
downloadhomer-bcf0e1bec2ea2b55def5e4377dc03d4fc6f3b928.tar.gz
homer-bcf0e1bec2ea2b55def5e4377dc03d4fc6f3b928.tar.zst
homer-bcf0e1bec2ea2b55def5e4377dc03d4fc6f3b928.zip
Merge pull request #119 from tpansino/feature/custom-card-colors
Feature/custom card colors
-rw-r--r--docs/configuration.md3
-rw-r--r--public/assets/custom.css.sample9
-rw-r--r--src/components/Service.vue15
3 files changed, 23 insertions, 4 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index edcf1ed..22f50fc 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -110,7 +110,8 @@ services:
110 subtitle: "Another example" 110 subtitle: "Another example"
111 tag: "other" 111 tag: "other"
112 url: "https://www.reddit.com/r/selfhosted/" 112 url: "https://www.reddit.com/r/selfhosted/"
113 target: "_blank" # optionnal html a tag target attribute 113 target: "_blank" # optional html a tag target attribute
114 # class: "green" # optional custom CSS class for card, useful with custom stylesheet
114``` 115```
115 116
116If you choose to fetch message information from an endpoint, the output format should be: 117If you choose to fetch message information from an endpoint, the output format should be:
diff --git a/public/assets/custom.css.sample b/public/assets/custom.css.sample
new file mode 100644
index 0000000..2465757
--- /dev/null
+++ b/public/assets/custom.css.sample
@@ -0,0 +1,9 @@
1@charset "UTF-8";
2
3/* Custom card colors */
4/* Use with `class:` property of services in config.yml */
5body #app .card .green
6{
7 background-color: #006600;
8 color: #00ff00;
9}
diff --git a/src/components/Service.vue b/src/components/Service.vue
index 88e6e69..4e35b7d 100644
--- a/src/components/Service.vue
+++ b/src/components/Service.vue
@@ -2,7 +2,10 @@
2 <div> 2 <div>
3 <div class="card"> 3 <div class="card">
4 <a :href="item.url" :target="item.target" rel="noreferrer"> 4 <a :href="item.url" :target="item.target" rel="noreferrer">
5 <div class="card-content"> 5 <div
6 class="card-content"
7 :class="item.class"
8 >
6 <div class="media"> 9 <div class="media">
7 <div v-if="item.logo" class="media-left"> 10 <div v-if="item.logo" class="media-left">
8 <figure class="image is-48x48"> 11 <figure class="image is-48x48">
@@ -15,8 +18,14 @@
15 </figure> 18 </figure>
16 </div> 19 </div>
17 <div class="media-content"> 20 <div class="media-content">
18 <p class="title is-4">{{ item.name }}</p> 21 <p
19 <p class="subtitle is-6">{{ item.subtitle }}</p> 22 class="title is-4"
23 :class="item.class"
24 >{{ item.name }}</p>
25 <p
26 class="subtitle is-6"
27 :class="item.class"
28 >{{ item.subtitle }}</p>
20 </div> 29 </div>
21 </div> 30 </div>
22 <div class="tag" :class="item.tagstyle" v-if="item.tag"> 31 <div class="tag" :class="item.tagstyle" v-if="item.tag">