mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 06:05:29 +01:00
🎨 Add data-backend and data-frontend attributes to HTML element https://github.com/siyuan-note/siyuan/issues/12549 (#16812)
This commit is contained in:
parent
6688418a47
commit
bafb045143
1 changed files with 3 additions and 0 deletions
|
|
@ -8,10 +8,13 @@ import {exportLayout} from "../layout/util";
|
|||
import {fetchPost} from "./fetch";
|
||||
import {isInAndroid, isInHarmony, isInIOS, isIPad, isIPhone, isMac, isWin11} from "../protyle/util/compatibility";
|
||||
import {setCodeTheme} from "../protyle/render/util";
|
||||
import {getBackend, getFrontend} from "./functions";
|
||||
|
||||
export const loadAssets = (data: Config.IAppearance) => {
|
||||
const htmlElement = document.getElementsByTagName("html")[0];
|
||||
htmlElement.setAttribute("lang", window.siyuan.config.appearance.lang);
|
||||
htmlElement.setAttribute("data-frontend", getFrontend()); // https://github.com/siyuan-note/siyuan/issues/12549
|
||||
htmlElement.setAttribute("data-backend", getBackend());
|
||||
htmlElement.setAttribute("data-theme-mode", getThemeMode());
|
||||
htmlElement.setAttribute("data-light-theme", window.siyuan.config.appearance.themeLight);
|
||||
htmlElement.setAttribute("data-dark-theme", window.siyuan.config.appearance.themeDark);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue