mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +02:00
tfe: rework desktop layout to 35/65 flex columns, independent scrolling, no horizontal overflow
Switched from grid to flex for two-column layout Left column (flex: 0 0 35%): author, title, meta, synopsis — scrolls independently Right column (flex: 1): files/media — scrolls independently Added .tfe-file-iframe class to PDF/website iframes, scoped width/height constraints All media gets width:100% + max-width:100% to prevent overflow Mobile (<900px): reverts to single-column page-level scrolling
This commit is contained in:
@@ -27,3 +27,4 @@
|
|||||||
- [x] Fix file size limits: align all layers (JS/FilepondHandler/ThesisFileHandler/validate-fragment) — video/audio 5 GB, default 500 MB, PDF 100 MB; fix JS fileValidateSizeFilter gate bug that rejected AV files >1 GB despite 8 GB per-ext cap
|
- [x] Fix file size limits: align all layers (JS/FilepondHandler/ThesisFileHandler/validate-fragment) — video/audio 5 GB, default 500 MB, PDF 100 MB; fix JS fileValidateSizeFilter gate bug that rejected AV files >1 GB despite 8 GB per-ext cap
|
||||||
- [x] Fix: deleting contact groups in apropos form not persisted (no change event after DOM removal, autosave never triggered)
|
- [x] Fix: deleting contact groups in apropos form not persisted (no change event after DOM removal, autosave never triggered)
|
||||||
- [x] Improve h1, h2, h3 size difference in base.css heading scale
|
- [x] Improve h1, h2, h3 size difference in base.css heading scale
|
||||||
|
- [x] Rework TFE page desktop layout: two columns 35%/65%, left = author/title/meta/synopsis, right = files, media 100% width; columns scroll independently, content fits 100vw
|
||||||
|
|||||||
@@ -6,42 +6,62 @@
|
|||||||
.tfe-main {
|
.tfe-main {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
overflow-y: auto;
|
overflow: hidden;
|
||||||
padding: var(--space-l) var(--space-m) var(--space-xl);
|
padding: var(--space-l) var(--space-m) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stacked article layout */
|
/* Stacked article layout — fills main height */
|
||||||
.tfe-layout {
|
.tfe-layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-xl);
|
gap: var(--space-xl);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Row 1: Author above Title */
|
/* Row 1: Author above Title (kept for backward compat, no longer used) */
|
||||||
.tfe-header-row {
|
.tfe-header-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-3xs);
|
gap: var(--space-3xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Row 2: Two columns — meta left, synopsis right */
|
/* Two-column layout: left 35vw (info), right fills remaining (files) */
|
||||||
.tfe-content-row {
|
.tfe-content-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 35vw 1fr;
|
||||||
gap: var(--space-xl);
|
gap: var(--space-xl);
|
||||||
align-items: start;
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Row 3: Files flex container */
|
/* Left column: stacks author, title, meta, synopsis — scrolls independently */
|
||||||
|
.tfe-left-column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-m);
|
||||||
|
overflow-y: auto;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Right column: holds files — scrolls independently */
|
||||||
|
.tfe-right-column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow-y: auto;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Files container inside right column */
|
||||||
.tfe-files {
|
.tfe-files {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-direction: column;
|
||||||
gap: var(--space-m);
|
gap: var(--space-m);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-file-item {
|
.tfe-file-item {
|
||||||
flex: 1 1 300px;
|
width: 100%;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
@@ -59,6 +79,7 @@
|
|||||||
.tfe-file-item embed,
|
.tfe-file-item embed,
|
||||||
.tfe-file-item video {
|
.tfe-file-item video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@@ -67,8 +88,13 @@
|
|||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-file-item embed {
|
.tfe-file-item embed,
|
||||||
|
.tfe-file-iframe {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
height: clamp(300px, 80vh, 700px);
|
height: clamp(300px, 80vh, 700px);
|
||||||
|
display: block;
|
||||||
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-file-item figcaption {
|
.tfe-file-item figcaption {
|
||||||
@@ -270,13 +296,23 @@
|
|||||||
|
|
||||||
/* Responsive */
|
/* Responsive */
|
||||||
@media (max-width: 900px) {
|
@media (max-width: 900px) {
|
||||||
.tfe-content-row {
|
.tfe-main {
|
||||||
grid-template-columns: 1fr;
|
overflow-y: auto;
|
||||||
gap: var(--space-l);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-file-item {
|
.tfe-layout {
|
||||||
flex: 1 1 100%;
|
height: auto;
|
||||||
|
min-height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tfe-content-row {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tfe-left-column,
|
||||||
|
.tfe-right-column {
|
||||||
|
overflow-y: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-title {
|
.tfe-title {
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
<main class="tfe-main" id="main-content">
|
<main class="tfe-main" id="main-content">
|
||||||
<article class="tfe-layout">
|
<article class="tfe-layout">
|
||||||
|
|
||||||
<!-- ROW 1: Author above Title -->
|
<!-- Two-column layout: left 35% (info), right 65% (files) -->
|
||||||
<div class="tfe-header-row">
|
<div class="tfe-content-row">
|
||||||
|
<div class="tfe-left-column">
|
||||||
|
|
||||||
<p class="tfe-author"><?= htmlspecialchars(
|
<p class="tfe-author"><?= htmlspecialchars(
|
||||||
$data["authors"] ?? "Auteur inconnu",
|
$data["authors"] ?? "Auteur inconnu",
|
||||||
) ?></p>
|
) ?></p>
|
||||||
@@ -13,10 +15,7 @@
|
|||||||
– <?= htmlspecialchars($data["subtitle"]) ?>
|
– <?= htmlspecialchars($data["subtitle"]) ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ROW 2: Two columns — meta left, synopsis right -->
|
|
||||||
<div class="tfe-content-row">
|
|
||||||
<div class="tfe-meta">
|
<div class="tfe-meta">
|
||||||
<?php if (!empty($data["orientation"])): ?>
|
<?php if (!empty($data["orientation"])): ?>
|
||||||
<p class="tfe-meta-item">
|
<p class="tfe-meta-item">
|
||||||
@@ -272,9 +271,10 @@
|
|||||||
<div class="tfe-synopsis-text tfe-synopsis-empty"></div>
|
<div class="tfe-synopsis-text tfe-synopsis-empty"></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ROW 3: All files — flex container -->
|
</div><!-- /tfe-left-column -->
|
||||||
|
|
||||||
|
<div class="tfe-right-column">
|
||||||
<div class="tfe-files">
|
<div class="tfe-files">
|
||||||
<?php $_videoIndex = 0; ?>
|
<?php $_videoIndex = 0; ?>
|
||||||
<?php if ($isInterdit): ?>
|
<?php if ($isInterdit): ?>
|
||||||
@@ -377,14 +377,12 @@
|
|||||||
<div class="tfe-file-item">
|
<div class="tfe-file-item">
|
||||||
<?php if ($isPdf): ?>
|
<?php if ($isPdf): ?>
|
||||||
<iframe src="<?= $mediaUrl ?>#toolbar=0&navpanes=0"
|
<iframe src="<?= $mediaUrl ?>#toolbar=0&navpanes=0"
|
||||||
width="100%" height="700px"
|
class="tfe-file-iframe"
|
||||||
style="border:none"
|
|
||||||
title="<?= $fileName ?>">
|
title="<?= $fileName ?>">
|
||||||
</iframe>
|
</iframe>
|
||||||
<?php elseif ($isWebsite): ?>
|
<?php elseif ($isWebsite): ?>
|
||||||
<iframe src="<?= $mediaUrl ?>"
|
<iframe src="<?= $mediaUrl ?>"
|
||||||
width="100%" height="700px"
|
class="tfe-file-iframe"
|
||||||
style="border:none"
|
|
||||||
title="<?= $fileName ?>"
|
title="<?= $fileName ?>"
|
||||||
sandbox="allow-scripts allow-same-origin"
|
sandbox="allow-scripts allow-same-origin"
|
||||||
loading="lazy">
|
loading="lazy">
|
||||||
@@ -454,5 +452,9 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div><!-- /tfe-right-column -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user