Skip to content

Commit

Permalink
fix pdfviewer on public pages
Browse files Browse the repository at this point in the history
Signed-off-by: szaimen <szaimen@e.mail.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
szaimen committed Sep 8, 2022
1 parent f0d0d2d commit 4d56a26
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/files_pdfviewer-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/files_pdfviewer-public.js.map

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ window.addEventListener('DOMContentLoaded', function() {
contentElmt.appendChild(viewerNode)
viewerNode.src = viewerUrl
footerElmt.style.display = 'none'
mainContent.style.minHeight = '100%' // Make the viewer take the whole height as the footer is now hidden.
mainContent.style.minHeight = 'calc(100% - var(--header-height))' // Make the viewer take the whole height as the footer is now hidden.
// overwrite style in order to fix the viewer on public pages
mainContent.style.marginLeft = '0'
mainContent.style.marginRight = '0'
mainContent.style.width = '100%'
mainContent.style.borderRadius = 'unset'
} else {
logger.error('Unable to inject the PDF Viewer')
}
Expand Down

0 comments on commit 4d56a26

Please sign in to comment.