>>>>>>>>>>>>>>>>>>>>> MEMÓRIA UTILIZAÇÃO <<<<<<<<<<<<<<<<<<<<<<<<
HTML:
JAVASCRIPT:
context.handlebars.registerHelper('memoryColor', function (usage) {
const value = parseFloat(usage.toString().replace('%', ''));
if (value > 90) return '#e74c3c';
if (value > 70) return '#ffcc00';
return '#2ecc71';
});
CSS:
.memory-header {
display: flex;
align-items: center;
background: #1E223C;
color: white;
border-radius: 20px;
padding: 20px 20px;
font-size: 18px;
font-weight: bold;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}
.memory-icon {
width: 45px;
height: 45px;
margin-left: 10px;
margin-right: 15px;
filter: invert(1) brightness(2);
}
.memory-title {
flex-grow: 1;
font-size: 16px;
}
.memory-badge {
display: inline-flex;
align-items: center;
justify-content: center;
height: 100%;
min-width: 60px;
border-radius: 50px;
padding: 6px 22px;
background: #2ecc71;
color: black;
font-size: 22px;
font-weight: 800;
text-align: center;
}
>>>>>>>>>>>>>>>>>>>>> CPU UTILIZAÇÃO <<<<<<<<<<<<<<<<<<<<<<<<
HTML:
JAVASCRIPT:
context.handlebars.registerHelper('cpuColor', function (usage) {
const value = parseFloat(usage.toString().replace('%', ''));
if (value > 90) return '#e74c3c';
if (value > 70) return '#ffcc00';
return '#2ecc71';
});
CSS:
.cpu-header {
display: flex;
align-items: center;
background: #1E223C;
color: white;
border-radius: 20px;
padding: 20px 20px;
font-size: 18px;
font-weight: bold;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}
.cpu-icon {
width: 45px;
height: 45px;
margin-left: 10px;
margin-right: 15px;
filter: invert(1) brightness(2);
}
.cpu-title {
flex-grow: 1;
font-size: 16px;
}
.cpu-badge {
display: inline-flex;
align-items: center;
justify-content: center;
height: 100%;
min-width: 60px;
border-radius: 50px;
padding: 6px 22px;
background: #2ecc71;
color: black;
font-size: 22px;
font-weight: 800;
text-align: center;
}