Skip to content

Commit fa9ef3d

Browse files
authored
Merge pull request #2 from andyblac/dev
Version 2.0 of card pack.
2 parents 7cb4930 + e41781a commit fa9ef3d

20 files changed

+747
-181
lines changed
+22-23
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
2-
custom_card_andyblac_status_icon_only:
3-
# v1.1
2+
custom_card_andyblac_count_info:
3+
# v1.2.1
44
template:
55
- "ulm_translation_engine"
66
variables:
7+
ulm_custom_card_andyblac_count_info_badge_bg: true
78
tap_action:
8-
action: "navigate"
9+
action: "[[[ return entity?.attributes?.navigation ? 'navigate' : 'more-info'; ]]]"
910
navigation_path: "[[[ return entity?.attributes?.navigation ? entity?.attributes?.navigation : 'none'; ]]]"
1011
hold_action:
1112
action: "more-info"
@@ -44,7 +45,6 @@ custom_card_andyblac_status_icon_only:
4445
service: "[[[ return variables.hold_action.service; ]]]"
4546
service_data: "[[[ return variables.hold_action.service_data; ]]]"
4647

47-
4848
state:
4949
- value: "unavailable"
5050
styles:
@@ -59,43 +59,42 @@ custom_card_andyblac_status_icon_only:
5959
- background-color: "rgba(var(--color-red),1)"
6060
- styles:
6161
label:
62-
- color: "[[[ return variables.ulm_card_status_color ? 'rgba(var(--color-'+variables.ulm_card_status_color+'),1)' : 'rgba(var(--color-theme),0.7)'; ]]]"
62+
- color: "[[[ return 'rgba(var(--color-'+variables.ulm_custom_card_andyblac_count_info_color_on+'),1)'; ]]]"
6363
- background-color: >
64-
[[[
65-
if (variables.ulm_card_status_badge_bg) {
66-
return variables.ulm_card_status_color ? 'rgba(var(--color-'+variables.ulm_card_status_color+'),0.2)' : 'rgba(var(--color-theme),0.2)';
64+
[[[
65+
if (variables.ulm_custom_card_andyblac_count_info_badge_bg) {
66+
return variables.ulm_custom_card_andyblac_count_info_color_on ? 'rgba(var(--color-'+variables.ulm_custom_card_andyblac_count_info_color_on+'),0.2)' : 'rgba(var(--color-theme),0.15)';
6767
} else {
68-
return variables.ulm_card_status_color ? 'rgba(var(--color-'+variables.ulm_card_status_color+'),0.0)' : 'rgba(var(--color-theme),0.0)';
68+
return 'none';
6969
}
7070
]]]
7171
icon:
72-
- color: "[[[ return variables.ulm_card_status_color ? 'rgba(var(--color-'+variables.ulm_card_status_color+'),1)' : 'rgba(var(--color-theme),0.7)'; ]]]"
72+
- color: "[[[ return variables.ulm_custom_card_andyblac_count_info_color_on ? 'rgba(var(--color-'+variables.ulm_custom_card_andyblac_count_info_color_on+'),1)' : 'rgba(var(--color-theme),0.7)'; ]]]"
7373
img_cell:
74-
- background-color: "[[[ return variables.ulm_card_status_color ? 'rgba(var(--color-'+variables.ulm_card_status_color+'),0.2)' : 'rgba(var(--color-theme),0.2)'; ]]]"
74+
- background-color: "[[[ return variables.ulm_custom_card_andyblac_count_info_color_on ? 'rgba(var(--color-'+variables.ulm_custom_card_andyblac_count_info_color_on+'),0.2)' : 'rgba(var(--color-theme),0.15)'; ]]]"
7575
id: "on"
7676
value: "[[[ return variables.ulm_active_state ]]]"
7777

7878
styles:
7979
label:
80-
- font-weight: "bold"
81-
- font-size: "90%"
82-
- border-radius: "[[[ return variables.ulm_card_status_badge_bg ? '50%' : '0%'; ]]]"
8380
- position: "absolute"
84-
- right: "6%"
85-
- top: "[[[ return variables.ulm_card_status_badge_bg ? '2%' : '0%'; ]]]"
86-
- height: "30%"
87-
- width: "30%"
88-
- line-height: "24px"
89-
- color: "rgba(var(--color-theme),0.2)"
90-
- background-color: "rgba(var(--color-theme),0)"
81+
- top: "3px"
82+
- right: "3px"
83+
- height: "20px"
84+
- width: "20px"
85+
- font-weight: "bold"
86+
- font-size: "16px"
87+
- color: "rgba(var(--color-theme),0.4)"
88+
- background-color: "rgba(var(--color-theme),0.05)"
89+
- border-radius: "50%"
9190
icon:
9291
- color: "rgba(var(--color-theme),0.2)"
9392
img_cell:
94-
- background-color: "rgba(var(--color-theme),0.05)"
95-
- border-radius: "50%"
9693
- position: "absolute"
9794
- left: "-18%"
9895
- top: "18%"
96+
- background-color: "rgba(var(--color-theme),0.05)"
97+
- border-radius: "50%"
9998
card:
10099
- border-radius: "15px"
101100
- box-shadow: "var(--box-shadow)"

custom_cards/custom_card_andyblac_person/custom_card_andyblac_person.yaml

+27-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
custom_card_andyblac_person:
3-
# v1.2
3+
# v1.2.1
44
template:
55
- "ulm_translation_engine"
66
variables:
@@ -35,35 +35,33 @@ custom_card_andyblac_person:
3535
- width: "[[[ return !variables.ulm_card_person_use_entity_picture ? '50%' : '100%'; ]]]"
3636
- place-self: "[[[ return !variables.ulm_card_person_use_entity_picture ? 'center' : 'stretch stretch'; ]]]"
3737
name:
38-
- position: "absolute"
39-
- font-weight: "bold"
40-
- font-size: "16px"
41-
- margin-top: "5%"
38+
- justify-self: "start"
39+
- align-self: "end"
40+
- margin-top: "4%"
4241
- margin-left: "33%"
43-
- margin-right: "20px"
44-
- margin-bottom: "10%"
4542
- max-width: "65%"
43+
- font-size: "16px"
44+
- font-weight: "bold"
4645
- text-overflow: "ellipsis"
4746
- overflow: "hidden"
4847
label:
49-
- position: "absolute"
50-
- font-weight: "bold"
48+
- justify-self: "start"
49+
- align-self: "end"
50+
- margin-top: "0%"
51+
- margin-left: "33%"
52+
- max-width: "65%"
5153
- font-size: "15px"
54+
- font-weight: "bold"
5255
- filter: "opacity(40%)"
53-
- margin-top: "17%"
54-
- margin-left: "33%"
55-
- margin-right: "20px"
56-
- margin-bottom: "7%"
57-
- max-width: "60%"
5856
- text-overflow: "ellipsis"
5957
- overflow: "hidden"
6058
img_cell:
61-
- background-color: "rgba(var(--color-theme),0.05)"
62-
- border-radius: "50%"
6359
- position: "absolute"
6460
- left: "-6%"
6561
- top: "18%"
6662
- width: "35%"
63+
- background-color: "rgba(var(--color-theme),0.05)"
64+
- border-radius: "50%"
6765
grid:
6866
- grid-template-areas: "'i n' 'i l'"
6967
- grid-template-columns: "min-content auto"
@@ -76,22 +74,22 @@ custom_card_andyblac_person:
7674
badge:
7775
- border-radius: "50%"
7876
- position: "absolute"
79-
- left: "18%"
80-
- top: "5%"
81-
- height: "20px"
82-
- width: "20px"
83-
- border: "2px solid var(--card-background-color)"
77+
- top: "0px"
78+
- left: "2px"
79+
- height: "18px"
80+
- width: "18px"
8481
- font-size: "12px"
8582
- line-height: "16px"
8683
- background-color: "[[[ return (entity.state !== 'home') ? 'rgba(var(--color-green),1)' : 'rgba(var(--color-blue),1)'; ]]]"
84+
- border: "2px solid var(--card-background-color)"
8785
battery: &card_andyblac_person_battery_styling
8886
- border-radius: "50%"
8987
- position: "absolute"
90-
- left: "18%"
91-
- bottom: "0%"
92-
- width: "15%"
93-
- height: "40%"
94-
- background-color: var(--card-background-color)
88+
- top: "0px"
89+
- left: "26px"
90+
- height: "22px"
91+
- width: "22px"
92+
- background-color: "var(--primary-background-color)"
9593
custom_fields:
9694
badge: >
9795
[[[
@@ -138,8 +136,9 @@ card_andyblac_person_battery:
138136
show_state: false
139137
styles:
140138
icon:
141-
- width: "80%"
142-
- height: "80%"
139+
- bottom: "2px"
140+
- width: "85%"
141+
- height: "85%"
143142
card:
144143
- background: "none"
145144
- box-shadow: "none"

0 commit comments

Comments
 (0)