Use Bootstrap 5 dark theme support
This commit is contained in:
parent
4e3493be91
commit
0231ebfeef
|
|
@ -128,9 +128,8 @@ export class AppComponent implements AfterViewInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
setTheme() {
|
setTheme() {
|
||||||
const doc = document.querySelector('html')
|
const theme = this.darkMode ? 'dark' : 'light';
|
||||||
const filter = this.darkMode ? "invert(1) hue-rotate(180deg)" : ""
|
document.documentElement.setAttribute('data-bs-theme', theme);
|
||||||
doc.style.filter = filter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
formatChanged() {
|
formatChanged() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue