Skip to content

Commit

Permalink
🎨 fix siyuan-note#9376
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Oct 10, 2023
1 parent f1d4f84 commit 4318aa4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/protyle/export/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -149,6 +155,7 @@ const renderPDF = (id: string) => {
</style>
<style>
${document.getElementById("pluginsStyle").innerHTML}
${snippetCSS}
</style>
</head>
<body>
Expand Down

0 comments on commit 4318aa4

Please sign in to comment.