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; word-wrap: anywhere;
} }
iframe.pdf-view {
width: 100%;
height: 800px;
}
#menuButton { #menuButton {
display: none; display: none;
position: fixed; position: fixed;

View File

@ -77,7 +77,7 @@ function getContent(note) {
} }
else if (note.type === 'file') { else if (note.type === 'file') {
if (note.mime === 'application/pdf') { 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 { else {
content = `<button type="button" onclick="location.href='api/notes/${note.noteId}/download'">Download file</button>`; content = `<button type="button" onclick="location.href='api/notes/${note.noteId}/download'">Download file</button>`;