feat: déplacer 'À lire aussi' après les réactions dans la colonne principale

This commit is contained in:
Cedric Abonnel
2026-05-13 01:32:03 +02:00
parent 0a44ab9da2
commit 78d6c656be
7 changed files with 355 additions and 21 deletions
+2 -20
View File
@@ -170,6 +170,8 @@ $hasSources = (!empty($externalLinks) || !empty($files))
</p>
<?php endif; ?>
<?php include __DIR__ . '/comments_section.php'; ?>
</div><!-- /col principale -->
<div class="post-sidebar-col order-3">
@@ -286,26 +288,6 @@ $hasSources = (!empty($externalLinks) || !empty($files))
</div>
<?php endif; ?>
<?php if (!empty($alsoReadArticles ?? [])): ?>
<h6 class="related-sidebar-title">À lire aussi</h6>
<?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; ?>
<?php endif; ?>
</aside>
</div>