Skip to content

Commit

Permalink
2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dckiller51 committed May 17, 2021
1 parent 8b12e69 commit e24b9aa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## 2.1.0
- Click on the icon to show or hide your score

## 2.0.0
- add the states (on the left)
- move the attributes of the body score "body" (on the bottom)
Expand Down
24 changes: 16 additions & 8 deletions body-miscale-card.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
((LitElement) => {
console.info(
'%c BODYMISCALE-CARD %c 2.0.0 ',
'%c BODYMISCALE-CARD %c 2.1.0 ',
'color: cyan; background: black; font-weight: bold;',
'color: darkblue; background: white; font-weight: bold;',
);
Expand Down Expand Up @@ -224,8 +224,6 @@
flex-direction: column;
height: 100%;
}
#hidden-score {
}
.background {
background-repeat: no-repeat;
background-position: center center;
Expand Down Expand Up @@ -293,6 +291,15 @@
display: inline-flex;
justify-content: space-between;
align-items: center;
}
input.divcheck {
display:none;
}
input.divcheck + div {
display:none;
}
input.divcheck:checked + div {
display:block;
}`;
}

Expand All @@ -315,16 +322,17 @@
</div>` : null}
</div>` : null}
${this.config.show.buttons ? html`
<div class="flex">
<label class="flex divcheck" for="hiddenscore">
${Object.values(this.config.buttons).filter(v => v).map(this.renderButton.bind(this))}
</div>` : null}
</label>` : null}
</ha-scale>
<ha-score>
<input type="checkbox" class="divcheck" id="hiddenscore"/>
<div class="hiddenscore">
${this.config.show.body ? html`
<div id="hiddenscore" class="score">
<div class="score">
${Object.values(this.config.body).filter(v => v).map(this.renderBody.bind(this))}
</div>` : null}
</ha-score>
</div>
</ha-card>` : html`<ha-card style="padding: 8px 16px">Entity '${this.config.entity}' not available...</ha-card>`;
}

Expand Down
4 changes: 2 additions & 2 deletions tracker.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"body-miscale-card": {
"updated_at": "2021-05-01",
"version": "2.0.0",
"updated_at": "2021-05-17",
"version": "2.1.0",
"remote_location": "https://raw.githubusercontent.com/dckiller51/lovelace-body-miscale-card/master/body-miscale-card.js",
"visit_repo": "https://github.com/dckiller51/lovelace-body-miscale-card",
"changelog": "https://github.com/dckiller51/lovelace-body-miscale-card/blob/master/CHANGELOG.md"
Expand Down

0 comments on commit e24b9aa

Please sign in to comment.