Merge pull request #1444 from basecamp/card-back-button
Treat the collection link like a back button rather than a title
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
module CollectionsHelper
|
||||
def link_back_to_collection(collection)
|
||||
link_to collection, class: "header__title btn borderless txt-large",
|
||||
style: "--btn-padding: 0.25ch 1ch 0.25ch 0.75ch; view-transistion-name: card-collection-title;",
|
||||
link_to collection, class: "btn borderless txt-medium",
|
||||
data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click click->turbo-navigation#backIfSamePath" } do
|
||||
tag.span ("←" + tag.strong(collection.name, class: "font-black")).html_safe
|
||||
tag.span ("←" + tag.strong(collection.name, class: "overflow-ellipsis")).html_safe
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
<% end %>
|
||||
|
||||
<% content_for :header do %>
|
||||
<%= link_back_to_collection(@card.collection) %>
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_back_to_collection(@card.collection) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= turbo_stream_from @card %>
|
||||
|
||||
Reference in New Issue
Block a user