mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-22 22:59:58 +08:00
Started work on supporting a dark-mode
- Most elements done, but still need to do editors, tables and final pass. - Toggled only by quick js check at the moment, checking via css media query. Need to make into user-preference toggle. For #1234
This commit is contained in:
@ -191,7 +191,8 @@ function getMode(suggestion, content) {
|
||||
* @returns {*|string}
|
||||
*/
|
||||
function getTheme() {
|
||||
return window.codeTheme || 'default';
|
||||
const darkMode = document.documentElement.classList.contains('dark-mode');
|
||||
return window.codeTheme || (darkMode ? 'darcula' : 'default');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user