tfe: wrap website iframe in overlay-style div with Site web badge, clearer link text

This commit is contained in:
Pontoporeia
2026-07-10 14:16:05 +02:00
parent c513ad2545
commit f5a7d70fbc
3 changed files with 80 additions and 23 deletions
+17 -12
View File
@@ -388,18 +388,23 @@
data-pdf-label="<?= htmlspecialchars($_pdfLabel) ?>"
tabindex="-1"></div>
<?php elseif ($isWebsite): ?>
<a href="<?= $mediaUrl ?>"
class="tfe-website-link"
target="_blank"
rel="noopener noreferrer">
Ouvrir dans un nouvel onglet ↗
</a>
<iframe src="<?= $mediaUrl ?>"
class="tfe-file-iframe"
title="<?= $fileName ?>"
sandbox="allow-scripts allow-same-origin"
loading="lazy">
</iframe>
<div class="tfe-website-wrapper">
<span class="tfe-website-badge">Site web</span>
<div class="tfe-website-overlay">
<a href="<?= $mediaUrl ?>"
class="tfe-website-open-btn"
target="_blank"
rel="noopener noreferrer">
Ouvrir le site web ↗
</a>
</div>
<iframe src="<?= $mediaUrl ?>"
class="tfe-file-iframe"
title="<?= $fileName ?>"
sandbox="allow-scripts allow-same-origin"
loading="lazy">
</iframe>
</div>
<?php elseif ($isImage): ?>
<img src="<?= $mediaUrl ?>"
alt="<?= htmlspecialchars($caption !== '' ? $caption : $data['title'] . ' — ' . ($data['authors'] ?? '')) ?>"