Convert more css to variables

This commit is contained in:
natsoni
2024-04-10 14:39:29 +09:00
parent ba6a7b58aa
commit 3e3bd32705
30 changed files with 54 additions and 51 deletions

View File

@@ -49,24 +49,24 @@ export class DifficultyMiningComponent implements OnInit {
.pipe(
map(([blocks, da]) => {
const maxHeight = blocks.reduce((max, block) => Math.max(max, block.height), 0);
let colorAdjustments = '#ffffff66';
let colorAdjustments = 'var(--transparent-fg)';
if (da.difficultyChange > 0) {
colorAdjustments = '#3bcc49';
colorAdjustments = 'var(--green)';
}
if (da.difficultyChange < 0) {
colorAdjustments = '#dc3545';
colorAdjustments = 'var(--red)';
}
let colorPreviousAdjustments = '#dc3545';
let colorPreviousAdjustments = 'var(--red)';
if (da.previousRetarget) {
if (da.previousRetarget >= 0) {
colorPreviousAdjustments = '#3bcc49';
colorPreviousAdjustments = 'var(--green)';
}
if (da.previousRetarget === 0) {
colorPreviousAdjustments = '#ffffff66';
colorPreviousAdjustments = 'var(--transparent-fg)';
}
} else {
colorPreviousAdjustments = '#ffffff66';
colorPreviousAdjustments = 'var(--transparent-fg)';
}
this.blocksUntilHalving = 210000 - (maxHeight % 210000);