From e9afa4d7dd68e43bafcc4fd75c01bbaf0e6401ce Mon Sep 17 00:00:00 2001 From: Tom Pansino <2768420+tpansino@users.noreply.github.com> Date: Wed, 2 Sep 2020 00:34:37 -0700 Subject: [PATCH] Rewrite custom card colors to use custom CSS classes instead of styles --- docs/configuration.md | 6 ++---- public/assets/custom.css.sample | 9 +++++++++ src/components/Service.vue | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 public/assets/custom.css.sample 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: subtitle: "Another example" tag: "other" url: "https://www.reddit.com/r/selfhosted/" - target: "_blank" # optionnal html a tag target attribute - # colors: # optional custom colors for card - # background: #66a5e2 - # text: #000000 + target: "_blank" # optional html a tag target attribute + # class: "green" # optional custom CSS class for card, useful with custom stylesheet ``` 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 @@ +@charset "UTF-8"; + +/* Custom card colors */ +/* Use with `class:` property of services in config.yml */ +body #app .card .green +{ + background-color: #006600; + color: #00ff00; +} 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 @@
@@ -20,11 +20,11 @@

{{ item.name }}

{{ item.subtitle }}