Added styles to the CPU temperature gauge
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-06-08 22:46:56 -04:00
parent 9d8678e421
commit bd9533182f
2 changed files with 5 additions and 3 deletions

View File

@ -19,7 +19,7 @@ setCpuTemp = () ->
si.cpuTemperature()
.then((data) ->
document.getElementById('cpuTemp').innerText = data.main
document.getElementById('cpuTempDisplay').children.item(0).style.height = (parseInt(data.main) + '%')
document.getElementById('cpuTempDisplay').children.item(0).style.height = ((100 - parseFloat(data.main)) + '%')
).catch((error) ->
console.error(error)
)

View File

@ -49,16 +49,18 @@ button
margin-left: auto
margin-right: auto
border: 4px solid #212121
background: rgb(61,191,37)
background: linear-gradient(0deg, rgba(61,191,37,1) 45%, rgba(253,255,2,1) 65%, rgba(253,255,2,1) 75%, rgba(253,45,45,1) 100%)
.tempGaugeFill
display: block
position: absolute
left: 0
bottom: 0
top: 0
box-sizing: border-box
width: 100%
height: 0
background: pink
background: white
#header h1
text-align: center