Merge pull request #153 from taigrr/appcolor

feat: Enables setting colors for individual cards
This commit is contained in:
Bastien Wirtz 2020-11-10 21:52:16 -08:00 committed by GitHub
commit ade77e4257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -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:

View File

@ -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">