feat: images de couverture (liste, vue article, og:image)

This commit is contained in:
Cedric Abonnel
2026-05-08 23:04:05 +02:00
parent 35503e43b0
commit 8703a5544f
4 changed files with 41 additions and 1 deletions
+7 -1
View File
@@ -32,7 +32,13 @@ ob_start();
<?php elseif ($isAvantPremiere): ?>
<div class="premiere-ribbon">Avant-première</div>
<?php endif; ?>
<div class="card-cover" style="background: <?= $gradient ?>"></div>
<?php
$coverFile = $post['cover'] ?? '';
$coverStyle = $coverFile !== ''
? 'background-image: url(/file?uuid=' . rawurlencode($post['uuid']) . '&name=' . rawurlencode($coverFile) . ')'
: 'background: ' . $gradient;
?>
<div class="card-cover" style="<?= $coverStyle ?>"></div>
<div class="card-body d-flex flex-column">
<h2 class="card-title">
<?php if ($isLocked): ?>