diff options
-rw-r--r-- | docs/configuration.md | 6 | ||||
-rw-r--r-- | public/assets/custom.css.sample | 9 | ||||
-rw-r--r-- | src/components/Service.vue | 6 |
3 files changed, 14 insertions, 7 deletions
diff --git a/docs/configuration.md b/docs/configuration.md index a8c0619..22f50fc 100644 --- a/docs/configuration.md +++ b/docs/configuration.md | |||
@@ -110,10 +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 | # colors: # optional custom colors for card | 114 | # class: "green" # optional custom CSS class for card, useful with custom stylesheet |
115 | # background: #66a5e2 | ||
116 | # text: #000000 | ||
117 | ``` | 115 | ``` |
118 | 116 | ||
119 | If you choose to fetch message information from an endpoint, the output format should be: | 117 | If 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 */ | ||
5 | body #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 1766af6..4e35b7d 100644 --- a/src/components/Service.vue +++ b/src/components/Service.vue | |||
@@ -4,7 +4,7 @@ | |||
4 | <a :href="item.url" :target="item.target" rel="noreferrer"> | 4 | <a :href="item.url" :target="item.target" rel="noreferrer"> |
5 | <div | 5 | <div |
6 | class="card-content" | 6 | class="card-content" |
7 | :style="(item.colors && item.colors.background) ? {backgroundColor: item.colors.background} : null" | 7 | :class="item.class" |
8 | > | 8 | > |
9 | <div class="media"> | 9 | <div class="media"> |
10 | <div v-if="item.logo" class="media-left"> | 10 | <div v-if="item.logo" class="media-left"> |
@@ -20,11 +20,11 @@ | |||
20 | <div class="media-content"> | 20 | <div class="media-content"> |
21 | <p | 21 | <p |
22 | class="title is-4" | 22 | class="title is-4" |
23 | :style="(item.colors && item.colors.text) ? {color: item.colors.text} : null" | 23 | :class="item.class" |
24 | >{{ item.name }}</p> | 24 | >{{ item.name }}</p> |
25 | <p | 25 | <p |
26 | class="subtitle is-6" | 26 | class="subtitle is-6" |
27 | :style="(item.colors && item.colors.text) ? {color: item.colors.text} : null" | 27 | :class="item.class" |
28 | >{{ item.subtitle }}</p> | 28 | >{{ item.subtitle }}</p> |
29 | </div> | 29 | </div> |
30 | </div> | 30 | </div> |