0347806ce1
https://fizzy.37signals.com/5986089/cards/1760/edit This also adds a proper resource for filtered collections, instead of changing the URL to cards for filtering cards.
41 lines
1.7 KiB
Plaintext
41 lines
1.7 KiB
Plaintext
<% @page_title = @card.title %>
|
|
<% @header_class = "header--card" %>
|
|
<%= turbo_stream_from @card %>
|
|
|
|
<% content_for :head do %>
|
|
<%= tag.meta property: "og:title", content: "#{@card.title} | #{@card.collection.name}" %>
|
|
<%= tag.meta property: "og:description", content: format_excerpt(@card&.description, length: 200) %>
|
|
<%= tag.meta property: "og:image", content: @card.image.attached? ? "#{request.base_url}#{url_for(@card.image)}" : "#{request.base_url}/app-icon.png" %>
|
|
<%= tag.meta property: "og:url", content: card_url(@card) %>
|
|
<% end %>
|
|
|
|
<% content_for :header do %>
|
|
<%= render "filters/menu", user_filtering: @user_filtering %>
|
|
|
|
<%= link_to collection_url(@card.collection), class: "header__title btn borderless txt-large",
|
|
style: "--btn-padding: 0.25ch 1ch 0.25ch 0.75ch; view-transistion-name: card-collection-title;",
|
|
data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click click->turbo-navigation#backIfSamePath" } do %>
|
|
<span class="overflow-ellipsis">
|
|
←
|
|
<strong class="font-black"><%= @card.collection.name %></strong>
|
|
</span>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div data-controller="beacon lightbox" data-beacon-url-value="<%= card_reading_url(@card) %>">
|
|
<%= render "cards/container", card: @card %>
|
|
|
|
<% if @card.published? || @card.drafted? %>
|
|
<%= render "cards/messages", card: @card %>
|
|
<% end %>
|
|
|
|
<%= render "layouts/lightbox" do %>
|
|
<% if @card.image.attached? %>
|
|
<%= button_to card_image_path(@card), method: :delete, class: "btn", data: { controller: "tooltip" } do %>
|
|
<%= icon_tag "trash" %>
|
|
<span class="for-screen-reader">Remove background image</span>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|