mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-11 09:44:21 +01:00
This commit is contained in:
parent
f1d4f8472b
commit
4318aa4463
1 changed files with 7 additions and 0 deletions
|
|
@ -78,6 +78,12 @@ const renderPDF = (id: string) => {
|
|||
themeStyle = `<link rel="stylesheet" type="text/css" id="themeStyle" href="${servePath}/appearance/themes/${window.siyuan.config.appearance.themeLight}/theme.css?${Constants.SIYUAN_VERSION}"/>`;
|
||||
}
|
||||
// data-theme-mode="light" https://github.com/siyuan-note/siyuan/issues/7379
|
||||
let snippetCSS = "";
|
||||
document.querySelectorAll("style").forEach((item) => {
|
||||
if (item.id.startsWith("snippet")) {
|
||||
snippetCSS += item.innerHTML;
|
||||
}
|
||||
})
|
||||
const html = `<!DOCTYPE html>
|
||||
<html lang="${window.siyuan.config.appearance.lang}" data-theme-mode="light" data-light-theme="${window.siyuan.config.appearance.themeLight}" data-dark-theme="${window.siyuan.config.appearance.themeDark}">
|
||||
<head>
|
||||
|
|
@ -149,6 +155,7 @@ const renderPDF = (id: string) => {
|
|||
</style>
|
||||
<style>
|
||||
${document.getElementById("pluginsStyle").innerHTML}
|
||||
${snippetCSS}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue