mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +02:00
fix: add missing bootstrap require in markdown-cheatsheet-fragment.php, add bottom padding to dialog
This commit is contained in:
@@ -253,7 +253,7 @@
|
||||
<?php if (!empty($data["baiu_link"])): ?>
|
||||
<?php
|
||||
$_baiuHref = htmlspecialchars($data["baiu_link"]);
|
||||
$_baiuLabel = preg_replace("#^https?://(www\\.)?#i", "", rtrim($data["baiu_link"], "/"));
|
||||
$_baiuLabel = parse_url($data["baiu_link"], PHP_URL_HOST) ?: preg_replace("#^https?://(www\\.)?#i", "", rtrim($data["baiu_link"], "/"));
|
||||
?>
|
||||
<p class="tfe-meta-item">
|
||||
<span class="tfe-meta-label">Lien :</span>
|
||||
@@ -382,7 +382,7 @@
|
||||
?>
|
||||
<div class="tfe-file-item">
|
||||
<?php if ($isPdf): ?>
|
||||
<iframe src="<?= $mediaUrl ?>"
|
||||
<iframe src="<?= $mediaUrl ?>#toolbar=0&navpanes=0"
|
||||
width="100%" height="700px"
|
||||
style="border:none"
|
||||
title="<?= $fileName ?>">
|
||||
@@ -395,15 +395,11 @@
|
||||
sandbox="allow-scripts allow-same-origin"
|
||||
loading="lazy">
|
||||
</iframe>
|
||||
<p class="tfe-pdf-fallback">
|
||||
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener">
|
||||
Ouvrir le site dans un nouvel onglet
|
||||
<span class="sr-only">(ouvre dans un nouvel onglet)</span>
|
||||
</a>
|
||||
</p>
|
||||
<?php elseif ($isImage): ?>
|
||||
<img src="<?= $mediaUrl ?>"
|
||||
alt="<?= htmlspecialchars($caption !== '' ? $caption : $data['title'] . ' — ' . ($data['authors'] ?? '')) ?>">
|
||||
alt="<?= htmlspecialchars($caption !== '' ? $caption : $data['title'] . ' — ' . ($data['authors'] ?? '')) ?>"
|
||||
draggable="false"
|
||||
oncontextmenu="return false">
|
||||
<?php elseif ($isVideo): ?>
|
||||
<?php if ($isPeerTube): ?>
|
||||
<?php
|
||||
@@ -413,7 +409,10 @@
|
||||
include APP_ROOT . '/templates/partials/peertube-embed.php';
|
||||
?>
|
||||
<?php else: ?>
|
||||
<video width="100%" controls>
|
||||
<video width="100%" controls
|
||||
controlsList="nodownload nofullscreen noremoteplayback"
|
||||
disablepictureinpicture
|
||||
oncontextmenu="return false">
|
||||
<source src="<?= $mediaUrl ?>" type="video/<?= htmlspecialchars($ext === 'mov' ? 'mp4' : $ext) ?>">
|
||||
<?php if ($_vttPath): ?>
|
||||
<track kind="captions"
|
||||
@@ -433,7 +432,9 @@
|
||||
include APP_ROOT . '/templates/partials/peertube-embed.php';
|
||||
?>
|
||||
<?php else: ?>
|
||||
<audio controls class="tfe-audio">
|
||||
<audio controls class="tfe-audio"
|
||||
controlsList="nodownload noremoteplayback"
|
||||
oncontextmenu="return false">
|
||||
<source src="<?= $mediaUrl ?>" type="audio/<?= htmlspecialchars(match($ext) {
|
||||
'mp3' => 'mpeg',
|
||||
'ogg', 'oga' => 'ogg',
|
||||
@@ -446,16 +447,8 @@
|
||||
Votre navigateur ne supporte pas la lecture audio.
|
||||
</audio>
|
||||
<?php endif; ?>
|
||||
<?php else: /* other — download only */ ?>
|
||||
<div class="tfe-download-file">
|
||||
<a href="<?= $mediaUrl ?>&download=1" class="tfe-download-link">
|
||||
<span class="tfe-download-icon">📎</span>
|
||||
<span><?= $fileName ?></span>
|
||||
</a>
|
||||
<?php if (!empty($file['file_size'])): ?>
|
||||
<small class="tfe-download-size"><?= number_format($file['file_size'] / 1024 / 1024, 2) ?> MB</small>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: /* other — not previewable, skip */ ?>
|
||||
<?php continue; ?>
|
||||
<?php endif; ?>
|
||||
<?php if ($caption !== '' && !$isOther): ?>
|
||||
<figcaption><?= htmlspecialchars($caption) ?></figcaption>
|
||||
|
||||
Reference in New Issue
Block a user