diff --git a/package-lock.json b/package-lock.json index ff8e1cedb..75e8aa526 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ipfs-webui", - "version": "2.7.2", + "version": "2.7.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/files/file-preview/FilePreview.css b/src/files/file-preview/FilePreview.css new file mode 100644 index 000000000..18a84eec7 --- /dev/null +++ b/src/files/file-preview/FilePreview.css @@ -0,0 +1,10 @@ +.FilePreviewPDF { + height: calc(100vh - 140px - 5.5rem); /* 100% of viewport height, minus fixed-height search box and PDF info bar based on font height */ + min-height: 100px; +} + +@media only screen and (max-width: 60em) { + .FilePreviewPDF { + height: calc(100vh - 234px - 14rem); /* 100% of viewport height, minus fixed-height search box, page nav header, and PDF info bar based on font height */ + } +} diff --git a/src/files/file-preview/FilePreview.js b/src/files/file-preview/FilePreview.js index 98ffc0b27..e318d4a9c 100644 --- a/src/files/file-preview/FilePreview.js +++ b/src/files/file-preview/FilePreview.js @@ -5,6 +5,7 @@ import isBinary from 'is-binary' import { Trans, withTranslation } from 'react-i18next' import typeFromExt from '../type-from-ext' import ComponentLoader from '../../loader/ComponentLoader.js' +import './FilePreview.css' class Preview extends React.Component { state = { @@ -32,7 +33,7 @@ class Preview extends React.Component { ) case 'pdf': return ( - + {t('noPDFSupport')} {t('downloadPDF')}