aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2020-11-10 21:52:16 -0800
committerGitHub <noreply@github.com>2020-11-10 21:52:16 -0800
commitade77e42578998abc44434c495b41bde37552fe0 (patch)
tree040b1005225d151abfcf476c87950a5e34481897
parentf8d0761d0ca8f928f8f15d134557b8ee329ca29c (diff)
parentbe30825917125bacbd7f1e24ed36923c92aee7af (diff)
downloadhomer-ade77e42578998abc44434c495b41bde37552fe0.tar.gz
homer-ade77e42578998abc44434c495b41bde37552fe0.tar.zst
homer-ade77e42578998abc44434c495b41bde37552fe0.zip
Merge pull request #153 from taigrr/appcolor
feat: Enables setting colors for individual cards
-rw-r--r--docs/configuration.md1
-rw-r--r--src/components/services/Generic.vue6
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index 43e9ba1..32de050 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -115,6 +115,7 @@ services:
115 type: "PiHole" # optional, loads a specific component that provides extra features. MUST MATCH a file name (without file extension) available in `src/components/services` 115 type: "PiHole" # optional, loads a specific component that provides extra features. MUST MATCH a file name (without file extension) available in `src/components/services`
116 target: "_blank" # optional html a tag target attribute 116 target: "_blank" # optional html a tag target attribute
117 # class: "green" # optional custom CSS class for card, useful with custom stylesheet 117 # class: "green" # optional custom CSS class for card, useful with custom stylesheet
118 # background: red # optional color for card to set color directly without custom stylesheet
118``` 119```
119 120
120If you choose to fetch message information from an endpoint, the output format should be: 121If you choose to fetch message information from an endpoint, the output format should be:
diff --git a/src/components/services/Generic.vue b/src/components/services/Generic.vue
index f19ee18..627bcde 100644
--- a/src/components/services/Generic.vue
+++ b/src/components/services/Generic.vue
@@ -12,7 +12,11 @@ export default {};
12 12
13<template> 13<template>
14 <div> 14 <div>
15 <div class="card" :class="item.class"> 15 <div
16 class="card"
17 :style="`background-color:${item.background};`"
18 :class="item.class"
19 >
16 <a :href="item.url" :target="item.target" rel="noreferrer"> 20 <a :href="item.url" :target="item.target" rel="noreferrer">
17 <div class="card-content"> 21 <div class="card-content">
18 <div class="media"> 22 <div class="media">