share pdf view is responsive

This commit is contained in:
zadam 2021-12-24 22:46:55 +01:00
parent c0aa14f586
commit 0217b1c85d
2 changed files with 7 additions and 2 deletions

View file

@ -52,6 +52,11 @@ pre {
word-wrap: anywhere;
}
iframe.pdf-view {
width: 100%;
height: 800px;
}
#menuButton {
display: none;
position: fixed;

View file

@ -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;
}