style: liens sans soulignement, zone illustration en haut des tuiles

This commit is contained in:
Cedric Abonnel
2026-05-08 13:47:04 +02:00
parent 87172baf68
commit debbfe37f8
11 changed files with 67 additions and 98 deletions
+13 -2
View File
@@ -2,17 +2,28 @@
require_once BASE_PATH . '/src/Parsedown.php';
$Parsedown = new Parsedown();
$coverGradients = [
'linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%)',
'linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%)',
'linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%)',
'linear-gradient(135deg, #fef3c7 0%, #fde68a 100%)',
'linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%)',
'linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%)',
];
ob_start();
?>
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4">
<?php foreach ($posts as $post): ?>
<?php
$html = $Parsedown->text($post['content']);
$preview = mb_strimwidth(strip_tags($html), 0, 160, '…');
$html = $Parsedown->text($post['content']);
$preview = mb_strimwidth(strip_tags($html), 0, 120, '…');
$gradient = $coverGradients[$post['id'] % count($coverGradients)];
?>
<div class="col">
<article class="card h-100">
<div class="card-cover" style="background: <?= $gradient ?>"></div>
<div class="card-body d-flex flex-column">
<h2 class="card-title">
<a href="route.php?action=view&id=<?= $post['id'] ?>">