From 1950d7968aed651b30055ccdb6fa8f8be24a82e5 Mon Sep 17 00:00:00 2001 From: Cedric Abonnel Date: Sat, 9 May 2026 13:25:09 +0200 Subject: [PATCH] =?UTF-8?q?style:=20restaure=20les=20couvertures=20(d?= =?UTF-8?q?=C3=A9grad=C3=A9s=20+=20vraie=20image=20si=20dispo)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/post_list.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/templates/post_list.php b/templates/post_list.php index 7cf0926..8b2b654 100644 --- a/templates/post_list.php +++ b/templates/post_list.php @@ -2,14 +2,24 @@ 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(); ?>
- + $post): ?> text($post['content']); $preview = mb_strimwidth(strip_tags($html), 0, 120, '…'); + $gradient = $coverGradients[$i % count($coverGradients)]; $postUrl = '/post/' . rawurlencode($post['slug']); $isDraft = !$post['published']; $isAvantPremiere = $post['published'] && strtotime((string)($post['published_at'] ?? '')) > time(); @@ -22,10 +32,13 @@ ob_start();
Avant-première
- - -
- + +