feat: déplacer 'À lire aussi' après les réactions dans la colonne principale
This commit is contained in:
@@ -44,6 +44,31 @@ $_SESSION['comment_csrf'] = $_csrfToken;
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($alsoReadArticles ?? [])): ?>
|
||||
<!-- ── À lire aussi ──────────────────────────────────────────────── -->
|
||||
<div class="also-read mb-4">
|
||||
<h6 class="also-read-title">À lire aussi</h6>
|
||||
<div class="also-read-grid">
|
||||
<?php foreach ($alsoReadArticles as $_also):
|
||||
$_alsoCover = $_also['cover'] ?? '';
|
||||
$_alsoCat = trim($_also['category'] ?? '');
|
||||
$_alsoGradient = coverGradient($_alsoCat !== '' ? $_alsoCat : $_also['uuid'], $allCats ?? []);
|
||||
$_alsoDate = date('d/m/Y', strtotime((string)($_also['published_at'] ?? $_also['created_at'] ?? '')));
|
||||
?>
|
||||
<a href="/post/<?= rawurlencode($_also['slug'] ?? '') ?>" class="related-card">
|
||||
<div class="related-card-thumb" style="<?= $_alsoCover !== ''
|
||||
? 'background-image:url(/file?uuid=' . rawurlencode($_also['uuid']) . '&name=' . rawurlencode($_alsoCover) . ');background-size:cover;background-position:center'
|
||||
: 'background:' . htmlspecialchars($_alsoGradient) ?>"></div>
|
||||
<div class="related-card-body">
|
||||
<div class="related-card-title"><?= htmlspecialchars($_also['title']) ?></div>
|
||||
<div class="related-card-date"><?= $_alsoDate ?></div>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- ── Commentaires ───────────────────────────────────────────────── -->
|
||||
<div id="comments" class="mb-4">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user