From 8703a5544f9a48d6aa80b35674aa9d8c386043e6 Mon Sep 17 00:00:00 2001 From: Cedric Abonnel Date: Fri, 8 May 2026 23:04:05 +0200 Subject: [PATCH] feat: images de couverture (liste, vue article, og:image) --- public/assets/css/style.css | 17 +++++++++++++++++ templates/layout.php | 5 +++++ templates/post_list.php | 8 +++++++- templates/post_view.php | 12 ++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 2a6cc62..e929f9c 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -151,6 +151,23 @@ a:hover { height: 120px; border-radius: var(--vl-radius) var(--vl-radius) 0 0; flex-shrink: 0; + background-size: cover; + background-position: center; +} + +/* Couverture pleine largeur dans la vue article */ +.article-cover { + margin: 0; + overflow: hidden; + border-radius: var(--vl-radius) var(--vl-radius) 0 0; + flex-shrink: 0; +} + +.article-cover img { + width: 100%; + height: 340px; + object-fit: cover; + display: block; } .card { diff --git a/templates/layout.php b/templates/layout.php index 1c496c9..03ef155 100644 --- a/templates/layout.php +++ b/templates/layout.php @@ -16,6 +16,11 @@ + + + + + diff --git a/templates/post_list.php b/templates/post_list.php index 5c7b044..1c5c67a 100644 --- a/templates/post_list.php +++ b/templates/post_list.php @@ -32,7 +32,13 @@ ob_start();
Avant-première
-
+ +

diff --git a/templates/post_view.php b/templates/post_view.php index a586877..238515b 100644 --- a/templates/post_view.php +++ b/templates/post_view.php @@ -7,10 +7,22 @@ ob_start(); ← Retour +
Brouillon
+ +
+ <?= htmlspecialchars($article['title']) ?> +
+