diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-20 19:57:30 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-20 19:57:30 +0200 |
| commit | f4add28460d69ba741ff03270228bae49ecda858 (patch) | |
| tree | 146b402a241e131ba4d780f4f180a5784662ac5f | |
| parent | 836308471f8d31ccdcdd3a5bd88bc76cc1c0831b (diff) | |
Improve discoverability of headline image logic in nodes#edit
| -rw-r--r-- | app/views/nodes/edit.html.erb | 4 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 2c1e975..da682f0 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -91,7 +91,8 @@ | |||
| 91 | <span class="related_asset_handle"><%= icon("grip-vertical", library: "tabler", "aria-hidden": true) %></span> | 91 | <span class="related_asset_handle"><%= icon("grip-vertical", library: "tabler", "aria-hidden": true) %></span> |
| 92 | <%= image_tag related.asset.upload.url(:thumb) %> | 92 | <%= image_tag related.asset.upload.url(:thumb) %> |
| 93 | <button type="button" class="related_asset_set_headline" | 93 | <button type="button" class="related_asset_set_headline" |
| 94 | aria-pressed="<%= related.headline? %>" aria-label="Set as headline image"> | 94 | aria-pressed="<%= related.headline? %>" aria-label="Set as headline image" |
| 95 | title="Use this photo as the page's headline image"> | ||
| 95 | <%= icon("star", library: "tabler", "aria-hidden": true) %> | 96 | <%= icon("star", library: "tabler", "aria-hidden": true) %> |
| 96 | </button> | 97 | </button> |
| 97 | <button type="button" class="related_asset_remove" aria-label="Remove image"> | 98 | <button type="button" class="related_asset_remove" aria-label="Remove image"> |
| @@ -100,6 +101,7 @@ | |||
| 100 | </li> | 101 | </li> |
| 101 | <% end %> | 102 | <% end %> |
| 102 | </ul> | 103 | </ul> |
| 104 | <p class="field_hint">The starred photo becomes this page's headline image on the public site. If none is starred, visitors get a link to browse all attached images instead.</p> | ||
| 103 | <%= text_field_tag nil, nil, id: "related_asset_search_term", placeholder: "Search images to attach…", autocomplete: "off" %> | 105 | <%= text_field_tag nil, nil, id: "related_asset_search_term", placeholder: "Search images to attach…", autocomplete: "off" %> |
| 104 | <div id="related_asset_search_results" class="search_results"></div> | 106 | <div id="related_asset_search_results" class="search_results"></div> |
| 105 | </div> | 107 | </div> |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index b171800..086e73d 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -1381,7 +1381,11 @@ div#image_browser ul li { | |||
| 1381 | 1381 | ||
| 1382 | .related_asset_set_headline:hover, | 1382 | .related_asset_set_headline:hover, |
| 1383 | .related_asset_set_headline[aria-pressed="true"] { | 1383 | .related_asset_set_headline[aria-pressed="true"] { |
| 1384 | color: #6b5900; | 1384 | color: #f5b400; |
| 1385 | } | ||
| 1386 | |||
| 1387 | .related_asset_set_headline[aria-pressed="true"] svg { | ||
| 1388 | fill: currentColor; | ||
| 1385 | } | 1389 | } |
| 1386 | 1390 | ||
| 1387 | .thumbnail_list li.is_headline { | 1391 | .thumbnail_list li.is_headline { |
