mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 11:39:37 +08:00
share pdf view is responsive
This commit is contained in:
parent
c0aa14f586
commit
0217b1c85d
2 changed files with 7 additions and 2 deletions
|
@ -52,6 +52,11 @@ pre {
|
|||
word-wrap: anywhere;
|
||||
}
|
||||
|
||||
iframe.pdf-view {
|
||||
width: 100%;
|
||||
height: 800px;
|
||||
}
|
||||
|
||||
#menuButton {
|
||||
display: none;
|
||||
position: fixed;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue