Files
fizzy/app/views/cards/show.html.erb
T
Andy Smith fdbb9c185e Merge branch 'main' into collection-nav
* main: (203 commits)
  Re-write help content, try a modal-like display
  Move to internal registry
  Show date instead of time for notifications older than 1 day
  Ensure checks are visible for tags and assignments
  Adjust padding so card number isn't cut off
  Don't color the collection header in considering
  Golden cards bubble to the top of Considering, too
  Adjust card collection header when colored golden
  Allow cards in Considering to gilded
  Hide focus ring on new card titles and step inputs
  Add hover effect for comment edit button
  Add hover effect to overflow button
  Improve multi-account behavior of the PWA
  Remove unneeded *
  Rename test
  Review the code to move cards
  Update editor
  Generalize and delete mentions too
  Remove unused code
  Make sure we don't remove accesses if collection is accessible
  ...
2025-07-08 15:34:01 -05:00

45 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<% @page_title = @card.title %>
<%= turbo_stream_from @card %>
<% content_for :header do %>
<% if @card.creating? && @card.can_recover_abandoned_creation? %>
<div class="fill-selected position-sticky flex align-center gap-half justify-center border-block margin-block-end"
style="view-transition-name: draft-banner; --card-color: <%= @card.color %>;">
You have an unsaved work. Would you like to continue where you left off?
<%= button_to card_recover_path(@card), class: "btn btn--reversed", data: { turbo_action: "replace" } do %>
<span>Restore</span>
<% end %>
</div>
<% end %>
<% if @card.drafted? %>
<div class="fill-selected position-sticky flex align-center gap-half fill-highlight justify-center border-block margin-block-end"
style="view-transition-name: draft-banner;">
This is a draft, its only visible to you.
<%= button_to card_publish_path(@card), class: "btn txt-small btn--link", style: "--btn-background: #{@card.color}" do %>
<span>Post to project</span>
<% end %>
</div>
<% end %>
<%= render "cards/show/header" %>
<% end %>
<header class="header card-perma__collection-header">
<%= link_to cards_path(collection_ids: [ @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" } do %>
<span>
&larr;
<strong class="font-black"><%= @card.collection.name %></strong>
</span>
<% end %>
</header>
<div data-controller="beacon" data-beacon-url-value="<%= card_reading_url(@card) %>">
<%= render "cards/container", card: @card %>
<% if @card.published? || @card.drafted? %>
<%= render "cards/messages", card: @card %>
<% end %>
</div>