Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
share pdf view is responsive
zadam0217b1c85de9
diff --git a/src/public/stylesheets/share.css b/src/public/stylesheets/share.cssindex 4adf7539bb..fcca8edb2e 100644--- a/src/public/stylesheets/share.css+++ b/src/public/stylesheets/share.css@@ -52,6 +52,11 @@ pre {word-wrap: anywhere;}+iframe.pdf-view {+ width: 100%;+ height: 800px;+}+#menuButton {display: none;position: fixed;diff --git a/src/share/content_renderer.js b/src/share/content_renderer.jsindex 51cb7248bd..14572b0627 100644--- a/src/share/content_renderer.js+++ b/src/share/content_renderer.js@@ -77,7 +77,7 @@ function getContent(note) {}else if (note.type === 'file') {if (note.mime === 'application/pdf') {- content = `<iframe height="800" width="800" src="api/notes/${note.noteId}/view"></iframe>`+ content = `<iframe class="pdf-view" src="api/notes/${note.noteId}/view"></iframe>`}else {content = `<button type="button" onclick="location.href='api/notes/${note.noteId}/download'">Download file</button>`;@@ -89,7 +89,7 @@ function getContent(note) {else {content = '<p>This note type cannot be displayed.</p>' + getChildrenList(note);}-+return content;}