summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-21 14:25:28 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-21 14:25:28 +0200
commitb54f70cb35df91d51b7829a10b8294ae5f28b7f5 (patch)
treecb3cb95cac71239523f8b51bad5742b10e8ab678 /app
parentc14683fe37fabe06082f43e8bf67debc4cca7297 (diff)
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.
Diffstat (limited to 'app')
-rw-r--r--app/views/nodes/show.html.erb10
1 files changed, 9 insertions, 1 deletions
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 @@
254 </div> 254 </div>
255 255
256 <% if @page.assets.images.any? %> 256 <% if @page.assets.images.any? %>
257 <% headline_asset_id = @page.related_assets.find_by(headline: true)&.asset_id %>
257 <div class="node_description">Images</div> 258 <div class="node_description">Images</div>
258 <div class="node_content node_info_group"> 259 <div class="node_content node_info_group">
259 <ul class="thumbnail_list"> 260 <ul class="thumbnail_list">
260 <% @page.assets.images.each do |asset| %> 261 <% @page.assets.images.each do |asset| %>
261 <li><%= link_to image_tag(asset.upload.url(:thumb)), asset_path(asset) %></li> 262 <li class="<%= "is_headline" if asset.id == headline_asset_id %>">
263 <%= link_to image_tag(asset.upload.url(:thumb)), asset_path(asset) %>
264 <% if asset.id == headline_asset_id %>
265 <span class="headline_indicator" title="This page's headline image">
266 <%= icon("star", library: "tabler", "aria-hidden": true) %>
267 </span>
268 <% end %>
269 </li>
262 <% end %> 270 <% end %>
263 </ul> 271 </ul>
264 </div> 272 </div>