Skip to content

Commit 8047433

Browse files
authored
Merge pull request #59 from traktore-org/develop
v1.1.0: Fix icon overflow + layout
2 parents e327fee + a0c7690 commit 8047433

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

dashboard/card/sem-battery-card.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,15 @@ class SEMBatteryCard extends HTMLElement {
215215
}
216216
.battery-icon {
217217
display: block;
218-
margin: 0 auto 2px;
218+
margin: 0 auto 1px;
219219
}
220220
.soc-value {
221-
font-size: 18px;
221+
font-size: 14px;
222222
font-weight: 700;
223223
font-variant-numeric: tabular-nums;
224224
color: #4db6ac;
225225
text-shadow: 0 0 8px rgba(77,182,172,0.3);
226+
line-height: 1;
226227
}
227228
228229
/* Metrics column */
@@ -320,7 +321,7 @@ class SEMBatteryCard extends HTMLElement {
320321
stroke-dashoffset="${circumference}"/>
321322
</svg>
322323
<div class="ring-center">
323-
<svg class="battery-icon" width="20" height="28" viewBox="0 0 20 30" fill="none" stroke="#4db6ac" stroke-width="1.8" opacity="0.7">
324+
<svg class="battery-icon" width="16" height="22" viewBox="0 0 20 30" fill="none" stroke="#4db6ac" stroke-width="1.8" opacity="0.7">
324325
<rect x="2" y="4" width="16" height="26" rx="3"/>
325326
<rect x="6" y="0" width="8" height="5" rx="2" fill="#4db6ac" opacity="0.5" stroke="none"/>
326327
</svg>

dashboard/card/sem-flow-card.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ class SEMFlowCard extends HTMLElement {
11351135
<circle id="soc-arc" cx="${B.cx}" cy="${B.cy}" r="${L.socR}" fill="none" stroke="${batteryColor}" stroke-width="5"
11361136
stroke-dasharray="${socCirc}" stroke-dashoffset="${socCirc}"
11371137
transform="rotate(-90 ${B.cx} ${B.cy})" stroke-linecap="round" opacity="0.75"/>
1138-
<g transform="translate(${B.cx},${B.cy})" stroke="${batteryColor}" fill="none" opacity="0.7">
1138+
<g transform="translate(${B.cx},${B.cy}) scale(0.8)" stroke="${batteryColor}" fill="none" opacity="0.7">
11391139
<rect x="-8" y="-13" width="16" height="26" rx="3" stroke-width="1.8"/>
11401140
<rect x="-3" y="-16" width="6" height="4" rx="1.5" fill="${batteryColor}" opacity="0.5" stroke="none"/>
11411141
</g>

0 commit comments

Comments
 (0)