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() {
|
||||
const doc = document.querySelector('html')
|
||||
const filter = this.darkMode ? "invert(1) hue-rotate(180deg)" : ""
|
||||
doc.style.filter = filter
|
||||
const theme = this.darkMode ? 'dark' : 'light';
|
||||
document.documentElement.setAttribute('data-bs-theme', theme);
|
||||
}
|
||||
|
||||
formatChanged() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue