Skip to content

Commit 5f67e5f

Browse files
authored
fix(styles): Fix stacked backgrounds (#620)
* fix(styles): Fix stacked backgrounds * feat(ui): Add ripple effect
1 parent fefc9a8 commit 5f67e5f

3 files changed

Lines changed: 17 additions & 9 deletions

File tree

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,30 @@
99
[![Buy Me A Coffee][buymeacoffee-image]][buymeacoffee-url]
1010
[![Twitter][twitter-image]][twitter-url]
1111

12+
> [!NOTE]
1213
> Air Purifier card for [Home Assistant][home-assistant] Lovelace UI
1314
1415
By default, the Home Assistant does not provide any card for controlling air purifiers. This card displays the state and allows to control your air purifier.
1516

1617
![Preview of purifier-card][preview-image]
1718

18-
## Installing
19+
## Sponsorship
20+
21+
Your generosity will help me maintain and develop more projects like this one.
1922

20-
**💡 Tip:** If you like this project ~~and want to get some stickers and postcards~~, consider giving me a tip for the time I spent building this project:
23+
- 💖 [Sponsor on GitHub][gh-sponsors-url]
24+
- ☕️ [Buy Me A Coffee][buymeacoffee-url]
25+
- Bitcoin: `bc1q7lfx6de8jrqt8mcds974l6nrsguhd6u30c6sg8`
26+
- Ethereum: `0x6aF39C917359897ae6969Ad682C14110afe1a0a1`
2127

22-
<a href="https://www.buymeacoffee.com/denysdovhan" target="_blank">
23-
<img src="https://cdn.buymeacoffee.com/buttons/default-black.png" alt="Buy Me A Coffee" width="150px">
24-
</a>
28+
## Installing
2529

2630
### HACS
2731

2832
This card is available in [HACS][hacs] (Home Assistant Community Store).
2933

34+
[![Add to HACS via My Home Assistant][hacs-install-image]][hacs-install-url]
35+
3036
Just search for `Purifier Card` in the plugins tab.
3137

3238
### Manual
@@ -303,10 +309,11 @@ MIT © [Denys Dovhan][denysdovhan]
303309

304310
[home-assistant]: https://www.home-assistant.io/
305311
[hacs]: https://hacs.xyz
312+
[hacs-install-image]: https://my.home-assistant.io/badges/hacs_repository.svg
313+
[hacs-install-url]: https://my.home-assistant.io/redirect/hacs_repository/?owner=denysdovhan&repository=purifier-card&category=plugin
306314
[preview-image]: https://user-images.githubusercontent.com/3459374/164275676-504d92aa-2c61-4451-ae9b-23dad113ce14.png
307315
[latest-release]: https://github.com/denysdovhan/purifier-card/releases/latest
308316
[ha-scripts]: https://www.home-assistant.io/docs/scripts/
309-
[xiaomi-miio-favorite-levels]: https://www.home-assistant.io/integrations/xiaomi_miio/#service-xiaomi_miiofan_set_favorite_level-air-purifiers-only
310317
[original-gif]: https://github.com/macbury/SmartHouse/blob/master/home-assistant/www/custom-lovelace/air-purifier/standby.gif
311318
[edit-readme]: https://github.com/denysdovhan/purifier-card/edit/master/README.md
312319
[add-translation]: https://github.com/denysdovhan/purifier-card/blob/master/CONTRIBUTING.md#how-to-add-translation

src/purifier-card.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ export class PurifierCard extends LitElement {
447447

448448
return html`
449449
<ha-card>
450+
<ha-ripple></ha-ripple>
450451
<div class="preview">
451452
<div class="header">
452453
<div class="tips">${this.renderPresetMode()}</div>

src/styles.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
:host {
22
--pc-background: var(
33
--ha-card-background,
4-
var(--card-background-color, white)
4+
var(--card-background-color, transparent)
55
);
66
--pc-primary-text-color: var(--primary-text-color);
77
--pc-secondary-text-color: var(--secondary-text-color);
88
--pc-icon-color: var(--secondary-text-color);
99
--pc-slider-path-color: var(--round-slider-path-color);
1010
--pc-slider-bar-color: var(--round-slider-bar-color);
11-
--pc-toolbar-background: var(--vc-background);
11+
--pc-toolbar-background: transparent;
1212
--pc-toolbar-icon-color: var(--secondary-text-color);
1313
--pc-divider-color: var(--entities-divider-color, var(--divider-color));
1414
--pc-spacing: 10px;
@@ -19,6 +19,7 @@
1919
}
2020

2121
ha-card {
22+
background: var(--pc-background);
2223
flex-direction: column;
2324
flex: 1;
2425
position: relative;
@@ -31,7 +32,6 @@ ha-card {
3132
}
3233

3334
.preview {
34-
background-color: var(--pc-background);
3535
position: relative;
3636
}
3737

0 commit comments

Comments
 (0)