-
-
+ $attachments = array_values(array_filter(
+ $files,
+ static fn ($f) =>
+ !isset($referenced[$f['name']])
+ && !str_starts_with($f['name'], '_thumb_')
+ && $f['name'] !== $coverFile
+ ));
+}
+
+$externalLinks = $article['external_links'] ?? [];
+$hasLeftSidebar = !empty($categorySidebar ?? []);
+?>
+
+
+
+
+
+
+
-
-
-
Modifier
-
Supprimer
+
+
+
+
+
+
Brouillon
+
+
Privé
+
+
+
>
+
+
![<?= htmlspecialchars($article['title']) ?>](/file?uuid=<?= rawurlencode($article['uuid']) ?>&name=<?= rawurlencode($coverFile) ?>)
+
+
+
+
+
+
+
+
+
+
+
= htmlspecialchars($category) ?>
+
+
= htmlspecialchars($article['title']) ?>
+
+
+ = htmlspecialchars($authorName) ?>
+ ·
+
+ = $pubDate ?>
+
+
+
+
+
ℹ Sources
+
+
+
+ 0): ?>
+
+ ★ = number_format((float)($ratingStats['avg'] ?? 0), 1) ?>
+ (= $ratingStats['count'] ?>)
+
+
+
+
+
+
+
+
+ = $Parsedown->text($rawContent) ?>
+
+
+
+
+ 0): ?>
+
+ Note : = number_format((float)($ratingStats['avg'] ?? 0), 1) ?>/5
+ — Connectez-vous pour noter.
+
+
+
+
+
+
+
+
+
+
Mon profil
+
+
+
+
+
+
+
+
Profil mis à jour.
+
+
+
= htmlspecialchars($profileError) ?>
+
+
+
+
+
+
+
+
+ 'Type MIME',
+ 'size' => 'Taille originale',
+ 'pages' => 'Pages',
+ 'page_size' => 'Format',
+ 'pdf_version' => 'Version PDF',
+ 'width' => 'Dimensions',
+ 'camera' => 'Appareil photo',
+ 'site_name' => 'Site',
+ 'og_type' => 'Type OG',
+ 'language' => 'Langue',
+ 'date' => 'Date',
+ 'description' => 'Description',
+ 'subject' => 'Sujet',
+ 'keywords' => 'Mots-clés',
+ 'copyright' => 'Copyright',
+ 'credit' => 'Crédit',
+ 'creator' => 'Créé avec',
+ 'producer' => 'Produit par',
+ 'canonical' => 'URL canonique',
+ 'og_image' => 'Image OG',
+];
+
+function renderMetaCell(string $key, mixed $val, array $row = []): string
+{
+ return match($key) {
+ 'size' => htmlspecialchars(number_format((float)$val / 1024, 1)) . ' Ko',
+ 'width' => htmlspecialchars((string)$val) . ' × ' . htmlspecialchars((string)($row['height'] ?? '?')) . ' px',
+ 'og_image' => str_starts_with((string)$val, '/')
+ ? '
$val) . ')
'
+ : '
' . htmlspecialchars((string)$val) . '',
+ 'canonical' => '
' . htmlspecialchars((string)$val) . '',
+ default => htmlspecialchars((string)$val),
+ };
+}
+?>
+
+
+
= htmlspecialchars($article['title']) ?>
+
+
+
+
+ Liens & sources externes
+ = count($externalLinks) ?>
+
+
+
+ Aucun lien externe enregistré.
+
+
+
+
+
+
+
+
+
+
 ?>)
+
+
+ = $isPdf ? '📑' : ($isImg ? '🖼' : '🔗') ?>
+
+
+
+
+
+
= htmlspecialchars($lnk['name'] ?? '') ?>
+
+ = htmlspecialchars($lnk['url'] ?? '') ?>
+
+
+
+
+
+ Auteur : = htmlspecialchars($lnk['author']) ?>
+
+
+ Ajouté le = htmlspecialchars(date('d/m/Y à H:i', strtotime((string)$lnk['added_at']))) ?>
+
+
+
+
+ isset($metaLabels[$k]) && $v !== null && $v !== '' && $k !== 'height', ARRAY_FILTER_USE_BOTH);
+ ?>
+
+
+
+ $label):
+ if (!isset($lMeta[$key]) || $lMeta[$key] === '' || $lMeta[$key] === null) {
+ continue;
+ }
+ ?>
+
+ | = $label ?> |
+ = renderMetaCell($key, $lMeta[$key], $lMeta) ?> |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ !str_starts_with($f['name'], '_thumb_')));
+?>
+
+
+ Pièces jointes
+ = count($realFiles) ?>
+
+
+
+ Aucun fichier joint.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ = match(true) {
+ str_starts_with($f['mime'], 'video/') => '🎬',
+ str_starts_with($f['mime'], 'audio/') => '🎵',
+ $f['mime'] === 'application/pdf' => '📑',
+ default => '📄',
+ } ?>
+
+
+
+
+
+
+
+
+
+
+
+ isset($metaLabels[$k]) && $v !== null && $v !== '' && $k !== 'height', ARRAY_FILTER_USE_BOTH);
+ ?>
+
+
+
+ $label):
+ if (!isset($fExtra[$key]) || $fExtra[$key] === '' || $fExtra[$key] === null) {
+ continue;
+ }
+ ?>
+
+ | = $label ?> |
+ = renderMetaCell($key, $fExtra[$key], $fExtra) ?> |
+
+
+
+
+
+
+
+
Pas de métadonnées enregistrées.
+
+
+
+
+
+
+
+
+
+
+