Skip to content

Commit

Permalink
ui: add fullscreen button
Browse files Browse the repository at this point in the history
  • Loading branch information
carlinmack committed May 10, 2024
1 parent b44df19 commit 8b93c69
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion invenio_previewer/extensions/pdfjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ def preview(file):
file=file,
html_tags='dir="ltr" mozdisallowselectionprint moznomarginboxes',
css_bundles=[],
js_bundles=[],
js_bundles=["fullscreen_js.js"],
)
7 changes: 7 additions & 0 deletions invenio_previewer/static/css/pdfjs/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -2060,6 +2060,7 @@
--toolbarButton-zoomOut-icon: url(/static/js/pdfjs/images/toolbarButton-zoomOut.svg);
--toolbarButton-zoomIn-icon: url(/static/js/pdfjs/images/toolbarButton-zoomIn.svg);
--toolbarButton-presentationMode-icon: url(/static/js/pdfjs/images/toolbarButton-presentationMode.svg);
--toolbarButton-fullscreen-icon: url(/static/js/pdfjs/images/toolbarButton-fullscreen.svg);
--toolbarButton-print-icon: url(/static/js/pdfjs/images/toolbarButton-print.svg);
--toolbarButton-openFile-icon: url(/static/js/pdfjs/images/toolbarButton-openFile.svg);
--toolbarButton-download-icon: url(/static/js/pdfjs/images/toolbarButton-download.svg);
Expand Down Expand Up @@ -2877,6 +2878,12 @@ body {
mask-image: var(--toolbarButton-editorStamp-icon);
}

#fullScreenMode::before,
#secondaryFullScreenMode::before {
-webkit-mask-image: var(--toolbarButton-fullscreen-icon);
mask-image: var(--toolbarButton-fullscreen-icon);
}

#print::before,
#secondaryPrint::before {
-webkit-mask-image: var(--toolbarButton-print-icon);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@
<span data-l10n-id="open_file_label">Open</span>
</button>

<button id="secondaryFullScreenMode" class="secondaryToolbarButton fullScreenMode visibleLargeView" title="{{_('Switch to Full Screen Mode')}}" tabindex="51" data-l10n-id="fullscreen">
<span data-l10n-id="fullscreen_label">Full Screen Mode</span>
</button>

<button id="secondaryPrint" class="secondaryToolbarButton visibleMediumView" title="Print" tabindex="52" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
Expand Down Expand Up @@ -273,6 +277,10 @@
<span data-l10n-id="open_file_label">Open</span>
</button>

<button id="fullScreenMode" class="toolbarButton hiddenLargeView" title="{{_('Switch to Full Screen Mode')}}" tabindex="31" data-l10n-id="fullscreen">
<span data-l10n-id="fullscreen_label">Full Screen Mode</span>
</button>

<button id="print" class="toolbarButton hiddenMediumView" title="Print" tabindex="32" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
Expand Down

0 comments on commit 8b93c69

Please sign in to comment.