From 687a9e4086ea57e2e614e453ef959263f89ba0a7 Mon Sep 17 00:00:00 2001 From: Tom Pansino <2768420+tpansino@users.noreply.github.com> Date: Sun, 9 Aug 2020 23:03:00 -0700 Subject: Add support for custom card colors --- src/components/Service.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/Service.vue b/src/components/Service.vue index 88e6e69..185d2a7 100644 --- a/src/components/Service.vue +++ b/src/components/Service.vue @@ -2,7 +2,10 @@
-
+
@@ -15,8 +18,14 @@
-

{{ item.name }}

-

{{ item.subtitle }}

+

{{ item.name }}

+

{{ item.subtitle }}

-- cgit v1.2.3 From 118d3e5ac0077edcf114fe1a052eb8e8e800fb81 Mon Sep 17 00:00:00 2001 From: Tom Pansino <2768420+tpansino@users.noreply.github.com> Date: Mon, 10 Aug 2020 17:25:43 -0700 Subject: Rename color: to colors: --- src/components/Service.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Service.vue b/src/components/Service.vue index 185d2a7..1766af6 100644 --- a/src/components/Service.vue +++ b/src/components/Service.vue @@ -4,7 +4,7 @@
@@ -20,11 +20,11 @@

{{ item.name }}

{{ item.subtitle }}

-- cgit v1.2.3 From 7e5ad02248551770613339957640f38d50ce670f Mon Sep 17 00:00:00 2001 From: Tom Pansino <2768420+tpansino@users.noreply.github.com> Date: Mon, 10 Aug 2020 23:31:34 -0700 Subject: Add example card colors to configuration.md --- docs/configuration.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index 1ced2d8..9790751 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -106,6 +106,9 @@ services: 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 ``` If you choose to fetch message information from an endpoint, the output format should be: -- cgit v1.2.3 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: 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 }}

-- cgit v1.2.3