mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 15:21:22 +02:00
tfe: wrap website iframe in overlay-style div with Site web badge, clearer link text
This commit is contained in:
@@ -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'] ?? '')) ?>"
|
||||
|
||||
Reference in New Issue
Block a user