This commit is contained in:
2026-07-15 19:34:13 -05:00
parent 84b7ee0a47
commit 8e0253821f
8 changed files with 663 additions and 751 deletions

View File

@@ -79,15 +79,15 @@ aside,
background: #555;
overflow: hidden;
}
.viewer #pdfViewer {
position: relative;
.native-pdf-frame {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
background: #525659;
border: 0;
display: block;
}
.viewer #pdfMessage {
.native-pdf-overlay {
position: absolute;
inset: 0;
display: grid;
@@ -95,9 +95,47 @@ aside,
color: white;
pointer-events: none;
z-index: 2;
white-space: pre-wrap;
padding: 20px;
background: rgba(0, 0, 0, 0.3);
}
.viewer.loaded #pdfMessage {
display: none;
.native-pdf-loading {
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: #aaa;
background: rgba(60, 60, 60, 0.8);
z-index: 3;
font-size: 15px;
}
.native-pdf-error {
position: absolute;
inset: 0;
display: grid;
place-items: center;
z-index: 3;
background: rgba(50, 50, 50, 0.9);
text-align: center;
padding: 30px 20px;
}
.native-pdf-error-msg {
color: #f88;
font-size: 16px;
margin-bottom: 12px;
white-space: pre-wrap;
}
.native-pdf-retry {
padding: 8px 24px;
font-size: 14px;
cursor: pointer;
border: 1px solid #888;
background: #444;
color: #eee;
border-radius: 4px;
}
.native-pdf-retry:hover {
background: #555;
}
dialog {
width: min(720px, 90vw);
@@ -127,7 +165,6 @@ dialog input {
.muted {
color: #777;
}
.error-banner {
padding: 10px 16px;
background: #fff1f1;
@@ -189,59 +226,3 @@ hr.field-sep {
width: auto;
margin-top: 0;
}
/* PDF.js viewer */
.pdf-v-overlay {
position: absolute;
inset: 0;
z-index: 1;
}
.pdf-v-loading {
padding: 40px 20px;
color: #aaa;
text-align: center;
font-size: 15px;
}
.pdf-v-error {
padding: 30px 20px;
text-align: center;
}
.pdf-v-error-msg {
color: #f88;
font-size: 16px;
margin-bottom: 12px;
white-space: pre-wrap;
}
.pdf-v-retry {
padding: 8px 24px;
font-size: 14px;
cursor: pointer;
border: 1px solid #888;
background: #444;
color: #eee;
border-radius: 4px;
}
.pdf-v-retry:hover {
background: #555;
}
.pdf-v-pages {
box-sizing: border-box;
width: 100%;
height: 100%;
overflow-y: scroll;
overflow-x: hidden;
scrollbar-gutter: stable;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
padding: 12px;
}
.pdf-v-page {
background: white;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
flex-shrink: 0;
}
.pdf-v-page canvas {
display: block;
}