From b54f70cb35df91d51b7829a10b8294ae5f28b7f5 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 21 Jul 2026 14:25:28 +0200 Subject: Show which image is headlined on nodes#show The editable sidebar has had a star toggle since headline designation shipped; the read-only view never gained any equivalent indicator. Same visual language -- gold filled star, same .is_headline card highlight already defined in admin.css. --- app/views/nodes/show.html.erb | 10 +++++++++- public/stylesheets/admin.css | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index af05778..a7be3c6 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb @@ -254,11 +254,19 @@ <% if @page.assets.images.any? %> + <% headline_asset_id = @page.related_assets.find_by(headline: true)&.asset_id %>
Images
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 086e73d..88c9c8b 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css @@ -1316,6 +1316,30 @@ div#image_browser ul li { border-radius: 4px; } +.thumbnail_list li { + position: relative; +} + +.thumbnail_list li .headline_indicator { + position: absolute; + top: 4px; + right: 4px; + width: 1.4rem; + height: 1.4rem; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background: rgba(255, 255, 255, 0.85); + color: #f5b400; +} + +.thumbnail_list li .headline_indicator svg { + width: 0.9rem; + height: 0.9rem; + fill: currentColor; +} + .related_asset_handle { display: flex; color: #969696; -- cgit v1.3