add high contrast theme

This commit is contained in:
Mononaut
2023-01-03 05:24:14 -06:00
committed by natsoni
parent 1ca05a029a
commit 79dd263fb1
54 changed files with 446 additions and 149 deletions

View File

@@ -46,13 +46,17 @@ export class ThemeService {
this.mempoolFeeColors = contrastMempoolFeeColors;
this.auditColors = contrastAuditColors;
}
if (!this.style) {
this.style = document.createElement('link');
this.style.rel = 'stylesheet';
this.style.href = `theme-${theme}.css`;
document.head.appendChild(this.style);
} else {
this.style.href = `theme-${theme}.css`;
try {
if (!this.style) {
this.style = document.createElement('link');
this.style.rel = 'stylesheet';
this.style.href = `${theme}.css`;
document.head.appendChild(this.style);
} else {
this.style.href = `${theme}.css`;
}
} catch (err) {
console.log('failed to apply theme stylesheet: ', err);
}
} else {
this.mempoolFeeColors = defaultMempoolFeeColors;