rework tfe.php layout: row1 author above title, row2 meta+synopsis 2-col grid, row3 flex files

This commit is contained in:
Pontoporeia
2026-06-08 12:40:17 +02:00
parent e0d706c677
commit a1a9a316ca
3 changed files with 82 additions and 61 deletions

View File

@@ -1,9 +1,8 @@
<main class="tfe-main" id="main-content">
<article class="tfe-layout">
<!-- LEFT: info article header -->
<section class="tfe-left">
<!-- Author above title -->
<!-- ROW 1: Author above Title -->
<div class="tfe-header-row">
<p class="tfe-author"><?= htmlspecialchars(
$data["authors"] ?? "Auteur inconnu",
) ?></p>
@@ -14,7 +13,10 @@
<?= htmlspecialchars($data["subtitle"]) ?>
<?php endif; ?>
</h1>
</div>
<!-- ROW 2: Two columns — meta left, synopsis right -->
<div class="tfe-content-row">
<div class="tfe-meta">
<?php if (!empty($data["orientation"])): ?>
<p class="tfe-meta-item">
@@ -230,14 +232,16 @@
</div>
<?php if (!empty($data["synopsis"])): ?>
<p class="tfe-synopsis-text">
<div class="tfe-synopsis-text">
<?= nl2br(htmlspecialchars($data["synopsis"])) ?>
</p>
</div>
<?php else: ?>
<div class="tfe-synopsis-text tfe-synopsis-empty"></div>
<?php endif; ?>
</section>
</div>
<!-- RIGHT: media — supplementary aside -->
<section class="tfe-right">
<!-- ROW 3: All files — flex container -->
<div class="tfe-files">
<?php $_videoIndex = 0; ?>
<?php if ($isInterdit): ?>
<p class="tfe-restricted">
@@ -336,6 +340,7 @@
$mediaUrl = $isPeerTube ? '' : ($isExternalUrl ? htmlspecialchars($filePath) : ('/media?path=' . urlencode($filePath)));
$fileName = htmlspecialchars($file["file_name"] ?? basename($filePath));
?>
<div class="tfe-file-item">
<?php if ($isPdf): ?>
<iframe src="<?= $mediaUrl ?>"
width="100%" height="700px"
@@ -415,11 +420,12 @@
<?php if ($caption !== '' && !$isOther): ?>
<figcaption><?= htmlspecialchars($caption) ?></figcaption>
<?php endif; ?>
</div>
<?php endforeach; ?>
<?php else: ?>
<p class="tfe-no-files">Aucun fichier disponible pour ce TFE.</p>
<?php endif; ?>
</section>
</div>
</article>
</main>