Skip to content

Commit

Permalink
#19345
Browse files Browse the repository at this point in the history
  • Loading branch information
nczirjak-acdh committed Dec 23, 2022
1 parent c62081e commit 42ccb8f
Show file tree
Hide file tree
Showing 374 changed files with 1,374 additions and 91,862 deletions.
30 changes: 20 additions & 10 deletions acdh_repo_gui.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,29 +82,39 @@ repo-collection-dl:
- core/jquery

ds-pdf-styles:
version: 1.0.1
header: true
version: 1.0.2
css:
base:
css/arche-pdf-view.css: {}
css/pdf_viewer/pdfjs-viewer.css: {}
css/pdf_viewer/pdftoolbar.css: {}
css/pdf_viewer/arche-pdf-viewer.css: {}
https://fonts.googleapis.com/icon?family=Material+Icons: { type: external }
https://fonts.googleapis.com/icon?family=Material+Icons+Outlined: { type: external }
js:
js/pdf/pdfjs-dist/build/pdf.js: {}
js/pdf/pdfviewer.js: {}
js/pdf/arche-ds-pdf.js: {}
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js: { type: external, minified: true }
https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.min.js: { type: external, minified: true }
js/pdf_viewer/pdfjs-viewer.min.js: {}
js/vcrSubmit.js: {}
js/search.js: {}
dependencies:
- core/drupal
- core/jquery

ds-pdf-modal-styles:
version: 1.0.1
header: true
version: 1.0.2
css:
base:
css/arche-pdf-view.css: {}
css/pdf_viewer/pdfjs-viewer.css: {}
css/pdf_viewer/pdftoolbar.css: {}
css/pdf_viewer/arche-pdf-viewer.css: {}
https://fonts.googleapis.com/icon?family=Material+Icons: { type: external }
https://fonts.googleapis.com/icon?family=Material+Icons+Outlined: { type: external }
js:
js/pdf/pdfjs-dist/build/pdf.js: {}
js/pdf/pdfviewer.js: {}
js/pdf/arche-ds-pdf-modal.js: {}
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js: { type: external, minified: true }
https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.min.js: { type: external, minified: true }
js/pdf_viewer/pdfjs-viewer.min.js: {}
js/vcrSubmit.js: {}
js/search.js: {}
dependencies:
Expand Down
52 changes: 0 additions & 52 deletions css/arche-pdf-view.css

This file was deleted.

42 changes: 42 additions & 0 deletions css/pdf_viewer/arche-pdf-viewer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
body {
margin: 0;
padding: 0;
}
.pdfviewer {
height: 100%;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
min-height: 500px;
}
.pdfviewer-container {
margin: 0;
padding: 0;
display: flex;
overflow: hidden;
flex: 1;
}
.thumbnails {
width: 150px !important;
border: 1px solid #aaa;
border-right: 3px solid #999;
background: #ccc;
}
.thumbnails .pdfpage.selected {
border: 2px solid #777;
border-radius: 2px;
}
.maindoc {
flex: 1;
}
.hide {
display: none;
}
input[type="file"] {
display: none;
}

.modal-body {
min-height: 500px;
}
72 changes: 72 additions & 0 deletions css/pdf_viewer/pdfjs-viewer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
Copyright 2020 Carlos de Alfonso (https://github.com/dealfonso)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.pdfjs-viewer {
overflow: auto;
border: 1px solid #aaa;
background: #ccc;
/* width: 100%; */
}
.pdfjs-viewer.horizontal-scroll {
display: flex;
}
.pdfjs-viewer.horizontal-scroll .pdfpage {
margin-left: 1em;
margin-top: 0.25em !important;
margin-bottom: 0.25em !important;
display: block;
}
.pdfpage {
position: relative;
margin-bottom: 1em;
margin-top: 1em;
margin-left: auto;
margin-right: auto;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.09);
display: flex;
}
.pdfpage canvas {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
.pdfpage.placeholder {
display: flex;
margin-bottom: 0em !important;
margin-top: 0em !important;
height: 100%;
width: 100%;
}
.pdfpage .content-wrapper {
margin: 0 !important;
padding: 0 !important;
display: flex !important;
}
.pdfpage .content-wrapper .loader {
border: 2px solid #f3f3f3;
border-top: 3px solid #3498db;
border-radius: 50%;
width: 24px;
height: 24px;
animation: spin 1s linear infinite;
margin: auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

106 changes: 106 additions & 0 deletions css/pdf_viewer/pdftoolbar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
.pdftoolbar {
width: 100%;
height: 32px;
background: #ddd;
z-index: 100;
vertical-align: middle;
display: flex;
margin: 0;
padding: 0;
}
.pdftoolbar * {
margin: auto 0;
}
.pdftoolbar span {
margin-right: 0.5em;
margin-left: 0.5em;
width: 4em !important;
font-size: 12px;
}
.pdftoolbar button, .pdftoolbar label.button, .pdftoolbar a.button {
min-width: 26px;
height: 28px;
border: none;
padding: 2px 4px 0;
margin: auto 1px;
border-radius: 2px;
line-height: 12px;
font-size: 14px;
background-color: #ddd;
cursor: pointer;
}
.pdftoolbar button i, .pdftoolbar label.button i {
font-size: 26px;
padding: 0;
margin: 0;
}
.pdftoolbar button:hover, .pdftoolbar label.button:hover, .pdftoolbar a.button:hover {
background-color: #ccc;
}
button.pushed {
background-color: #aaa !important;
}
.pdftoolbar a.button {
color: inherit;
}
.pdftoolbar .divider {
flex: 1;
}
.pdftoolbar .v-sep {
width: 0px;
height: 20px;
border-left: 1px solid #bbb;
}
.pdftoolbar .h-sep {
width: 100%;
height: 0px;
border-top: 1px solid #bbb;
margin: 0.25em 0;
}
.pdftoolbar .dropdown.dropdown-right {
float: right
}
.pdftoolbar .dropdown.dropdown-right .dropdown-content {
right: 0;
left: auto;
}
.pdftoolbar .dropdown-value {
background-color: #ccc;
padding: 0px 4px 2;
cursor: pointer;
}
.pdftoolbar .dropdown-value i {
width: auto;
font-size: 12px;
}
/* Dropdown Content (Hidden by Default) */
.pdftoolbar .dropdown-content {
display: none;
position: absolute;
margin-top: 0;
background-color: #eee;
min-width: 10em;
z-index: 1;
font-size: 12px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.09);
}
/* Links inside the dropdown */
.pdftoolbar .dropdown-content a {
all: initial;
font: inherit;
color: black;
padding: 6px 8px;
text-decoration: none;
display: flex;
cursor: pointer;
}
.pdftoolbar .dropdown-content i {
font-size: 16px;
padding-right: 0.5em;
}
.pdftoolbar .dropdown-content a:hover {
background-color: #ddd;
}
.pdftoolbar .dropdown:hover .dropdown-content, .dropdown .dropdown-content:hover {
display: block;
}
Loading

0 comments on commit 42ccb8f

Please sign in to comment.