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() si.cpuTemperature()
.then((data) -> .then((data) ->
document.getElementById('cpuTemp').innerText = data.main 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) -> ).catch((error) ->
console.error(error) console.error(error)
) )

View File

@ -49,16 +49,18 @@ button
margin-left: auto margin-left: auto
margin-right: auto margin-right: auto
border: 4px solid #212121 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 .tempGaugeFill
display: block display: block
position: absolute position: absolute
left: 0 left: 0
bottom: 0 top: 0
box-sizing: border-box box-sizing: border-box
width: 100% width: 100%
height: 0 height: 0
background: pink background: white
#header h1 #header h1
text-align: center text-align: center