1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Give space for buttons to sit above text

This commit is contained in:
Nathan Mascitelli 2021-05-02 23:08:38 -04:00
parent 5b05db5403
commit b04fff2089
2 changed files with 6 additions and 4 deletions

View file

@ -267,10 +267,14 @@ export class BookPlayer {
const downloadHref = apiClient.getItemDownloadUrl(item.Id); const downloadHref = apiClient.getItemDownloadUrl(item.Id);
const book = epubjs(downloadHref, {openAs: 'epub'}); const book = epubjs(downloadHref, {openAs: 'epub'});
// We need to calculate the height of the window beforehand because using 100% is not accurate when the dialog is opening.
// In addition we don't render to the full height so that we have space for the top buttons.
const clientHeight = document.body.clientHeight;
const renderHeight = clientHeight - (clientHeight * 0.0425);
const rendition = book.renderTo('bookPlayerContainer', { const rendition = book.renderTo('bookPlayerContainer', {
width: '100%', width: '100%',
// Calculate the height of the window because using 100% is not accurate when the dialog is opening height: renderHeight,
height: document.body.clientHeight,
// TODO: Add option for scrolled-doc // TODO: Add option for scrolled-doc
flow: 'paginated' flow: 'paginated'
}); });

View file

@ -11,8 +11,6 @@
.topButtons { .topButtons {
z-index: 1002; z-index: 1002;
position: absolute;
top: 0;
width: 100%; width: 100%;
color: #000; color: #000;
opacity: 0.7; opacity: 0.7;