Skip to content

Commit

Permalink
Merge pull request #153 from taigrr/appcolor
Browse files Browse the repository at this point in the history
feat: Enables setting colors for individual cards
  • Loading branch information
bastienwirtz authored Nov 11, 2020
2 parents f8d0761 + be30825 commit ade77e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ services:
type: "PiHole" # optional, loads a specific component that provides extra features. MUST MATCH a file name (without file extension) available in `src/components/services`
target: "_blank" # optional html a tag target attribute
# class: "green" # optional custom CSS class for card, useful with custom stylesheet
# background: red # optional color for card to set color directly without custom stylesheet
```

If you choose to fetch message information from an endpoint, the output format should be:
Expand Down
6 changes: 5 additions & 1 deletion src/components/services/Generic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export default {};

<template>
<div>
<div class="card" :class="item.class">
<div
class="card"
:style="`background-color:${item.background};`"
:class="item.class"
>
<a :href="item.url" :target="item.target" rel="noreferrer">
<div class="card-content">
<div class="media">
Expand Down

0 comments on commit ade77e4

Please sign in to comment.