b0aae3ad9e
This reverts commit a4cc143b09.
39 lines
1.5 KiB
Plaintext
39 lines
1.5 KiB
Plaintext
<% @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, it’s 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 %>
|
||
|
||
<nav class="align-start max-width">
|
||
<%= link_to_home %>
|
||
<%= link_to_back fallback_path: cards_path(collection_id: @card.collection) %>
|
||
</nav>
|
||
<% end %>
|
||
|
||
<div data-controller="beacon" data-beacon-url-value="<%= card_reading_url(@card) %>">
|
||
<%= render "cards/container", card: @card %>
|
||
|
||
<% if @card.published? %>
|
||
<%= render "cards/messages", card: @card %>
|
||
<% end %>
|
||
</div>
|