From 7032f46e7961aee3d4fb8641d1ea02c3519252f6 Mon Sep 17 00:00:00 2001 From: Eric Bus Date: Tue, 24 Nov 2026 14:05:14 +0100 Subject: [PATCH] News list rows: image next to the text, height follows content - Image column exactly as wide as the image, 12px gap to the title (was a third of the row: 28-152px of empty space depending on the list) - Long titles stay inside the list on desktop - /nieuws and tag pages: rows follow their content (fixed 115px removed), like the homepage and sidebar lists Co-Authored-By: Claude Opus 5.5 --- public/css/style.css | 17 +++++++++++++---- resources/assets/sass/components/_blog.scss | 18 ++++++++++++++++++ resources/assets/sass/layout/_news.scss | 7 ++----- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 77df52bf..c21b326f 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1205,6 +1205,19 @@ div.pp_default .pp_close:hover { } .blog .post > .row { align-items: flex-start; + flex-wrap: nowrap; +} +.blog .post > .row > .col-4 { + flex: 0 0 auto; + width: auto; + padding-right: 0; +} +.blog .post > .row > .col-8 { + flex: 1 1 auto; + width: auto; + min-width: 0; + padding-left: 12px; + padding-right: calc(var(--bs-gutter-x) * 0.5); } .blog .post img { display: block; @@ -1653,10 +1666,6 @@ h2.box_header span { font-weight: 500; } -.news .blog .post { - height: 115px; -} - .bread_crumb { height: 38px; margin: 0; diff --git a/resources/assets/sass/components/_blog.scss b/resources/assets/sass/components/_blog.scss index 6fb4969a..270053fa 100644 --- a/resources/assets/sass/components/_blog.scss +++ b/resources/assets/sass/components/_blog.scss @@ -10,6 +10,24 @@ // hoogte volgt de inhoud (titel + datum), zodat er geen lege ruimte onder korte berichten ontstaat > .row { align-items: flex-start; + flex-wrap: nowrap; + + // Image column exactly as wide as the image, the text right next to it + // (was a third of the row, which left a large gap on wide lists) + > .col-4 { + flex: 0 0 auto; + width: auto; + padding-right: 0; + } + + > .col-8 { + flex: 1 1 auto; + width: auto; + min-width: 0; + padding-left: 12px; + // Cancels the row's negative margin, so long titles stay inside the list + padding-right: calc(var(--bs-gutter-x) * 0.5); + } } img { diff --git a/resources/assets/sass/layout/_news.scss b/resources/assets/sass/layout/_news.scss index 966331e8..686f5f36 100644 --- a/resources/assets/sass/layout/_news.scss +++ b/resources/assets/sass/layout/_news.scss @@ -1,7 +1,4 @@ @use "../components/news_post"; -.news { - .blog .post { - height: 115px; - } -} +// News list rows (/nieuws and tag pages) follow their content, like the other +// lists; they used to have a fixed height of 115px