mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +02:00
Fix lint: use IterableCallbackReturn — wrap forEach body in braces
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
gap: var(--space-3xs);
|
||||
}
|
||||
|
||||
/* Two-column layout: left 35vw (info), right fills remaining (files) */
|
||||
/* Two-column layout: left 40vw (info), right fills remaining (files) */
|
||||
.tfe-content-row {
|
||||
display: grid;
|
||||
grid-template-columns: 35vw 1fr;
|
||||
grid-template-columns: 40vw 1fr;
|
||||
gap: var(--space-xl);
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -66,6 +66,10 @@
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.tfe-file-item:has(.pdf-embed-wrapper) {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.tfe-file-item img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@@ -293,6 +297,190 @@
|
||||
outline-color: #fc8181;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
PDF.js IN-PAGE VIEWER (pdf-viewer.js)
|
||||
============================================================ */
|
||||
|
||||
/*── Base wrapper ───────────────────────────── */
|
||||
|
||||
.pdf-embed-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
outline: none;
|
||||
transition: height 0.35s ease, border-color 0.35s ease;
|
||||
}
|
||||
|
||||
/* ── Collapsed state: thumbnail tile ────────── */
|
||||
|
||||
.pdf-collapsed {
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
min-height: 200px;
|
||||
max-height: 350px;
|
||||
}
|
||||
|
||||
.pdf-thumbnail {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* ── Overlay veil + enter button ────────────── */
|
||||
|
||||
.pdf-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgb(0 0 0 / 0.15);
|
||||
backdrop-filter: blur(4px) saturate(0.6);
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.pdf-overlay:hover {
|
||||
background: rgb(0 0 0 / 0.08);
|
||||
}
|
||||
|
||||
/* Document type pill — top-left of the overlay */
|
||||
|
||||
.pdf-overlay-badge {
|
||||
position: absolute;
|
||||
top: var(--space-xs);
|
||||
left: var(--space-xs);
|
||||
z-index: 2;
|
||||
display: inline-block;
|
||||
padding: 0.15em 0.6em;
|
||||
font-size: var(--step--2);
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
color: color-mix(in srgb, var(--accent-primary) 90%, #000);
|
||||
background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--accent-primary) 25%, transparent);
|
||||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.pdf-enter-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2xs);
|
||||
padding: var(--space-xs) var(--space-m);
|
||||
background: var(--accent-primary);
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
font-size: var(--step-0);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
|
||||
transition: transform 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
|
||||
.pdf-enter-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgb(0 0 0 / 0.25);
|
||||
}
|
||||
|
||||
/* ── Expanded state: wrapper becomes scroll panel ── */
|
||||
|
||||
.pdf-expanded {
|
||||
/* Fill viewport minus the column's vertical padding */
|
||||
max-height: calc(100vh - var(--space-xl) * 2);
|
||||
height: clamp(400px, 80vh, calc(100vh - var(--space-xl) * 2));
|
||||
overflow-y: auto;
|
||||
border: 2px solid var(--accent-primary);
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ── Toolbar ────────────────────────────────── */
|
||||
|
||||
.pdf-toolbar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3xs);
|
||||
padding: var(--space-2xs) var(--space-xs);
|
||||
background: var(--bg-primary);
|
||||
border-bottom: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
flex-shrink: 0;
|
||||
font-size: var(--step--1);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.pdf-toolbar-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--surface);
|
||||
color: var(--text-primary);
|
||||
cursor: pointer;
|
||||
font-size: inherit;
|
||||
line-height: 1;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.pdf-toolbar-btn:hover {
|
||||
background: color-mix(in srgb, var(--accent-primary) 15%, var(--surface));
|
||||
}
|
||||
|
||||
.pdf-toolbar-close {
|
||||
margin-right: var(--space-xs);
|
||||
}
|
||||
|
||||
.pdf-toolbar-label {
|
||||
min-width: 4.5em;
|
||||
text-align: center;
|
||||
color: var(--text-secondary);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.pdf-toolbar-scale {
|
||||
min-width: 3em;
|
||||
}
|
||||
|
||||
/* ── Scroll container ────────────────────────── */
|
||||
|
||||
.pdf-canvas {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
|
||||
background: #fff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.pdf-canvas:first-of-type {
|
||||
margin-top: var(--space-xs);
|
||||
}
|
||||
|
||||
.pdf-canvas:last-of-type {
|
||||
margin-bottom: var(--space-xs);
|
||||
}
|
||||
|
||||
.pdf-canvas + .pdf-canvas {
|
||||
margin-top: var(--space-2xs);
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 900px) {
|
||||
.tfe-main {
|
||||
|
||||
Reference in New Issue
Block a user