feat(pdfjs): improve style to better match Trilium

This commit is contained in:
Elian Doran 2025-12-29 12:35:49 +02:00
parent 446822a7ae
commit 667eaca9f2
No known key found for this signature in database
3 changed files with 15 additions and 0 deletions

View File

@ -5,6 +5,7 @@ const build = new BuildHelper("packages/pdfjs-viewer");
async function main() {
build.copy("viewer", "web");
build.copy("src/custom.mjs", "web/custom.mjs");
build.copy("src/custom.css", "web/custom.css");
build.copy("/node_modules/pdfjs-dist/build/pdf.mjs", "build/pdf.mjs");
build.copy("/node_modules/pdfjs-dist/build/pdf.worker.mjs", "build/pdf.worker.mjs");
}

View File

@ -0,0 +1,13 @@
:root {
--toolbar-bg-color: var(--tn-main-background);
--toolbar-border-color: var(--tn-main-border-color);
}
body {
--body-bg-color: var(--tn-main-background);
}
.page .canvasWrapper {
border: 1px solid var(--tn-main-border-color);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

View File

@ -32,6 +32,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<script src="../build/pdf.mjs" type="module"></script>
<link rel="stylesheet" href="viewer.css" />
<link rel="stylesheet" href="custom.css" />
<script src="custom.mjs" type="module"></script>
<script src="viewer.mjs" type="module"></script>