Files
fizzy/app/views/bubbles/show.html.erb
T
2024-09-18 13:09:06 -04:00

31 lines
1.2 KiB
Plaintext

<% content_for :header do %>
<nav>
<%= link_to project_bubbles_path(@bubble.project), class: "btn flex-item-justify-start" do %>
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
<span class="for-screen-reader">All Bubbles</span>
<% end %>
<div class="flex-item-justify-end" data-controller="dialog">
<%= tag.button class: "btn flex-item-justify-end", popovertarget: "bubble-edit-panel" do %>
<%= image_tag "pencil.svg", aria: { hidden: true }, size: 24 %>
<span class="for-screen-reader">Edit <%= @bubble.title %></span>
<% end %>
<dialog class="panel" id="bubble-edit-panel" data-dialog-target="dialog" popover>
<div class="flex pad">
<%= turbo_frame_tag @bubble, :edit, src: edit_project_bubble_path(@bubble.project, @bubble), target: "_top" %>
</div>
</dialog>
</div>
</nav>
<% end %>
<div class="bubble__perma flex justify-center center margin-block-end-double">
<%= render @bubble %>
</div>
<section class="comments align-center center borderless margin flex flex-column gap-half" style="--bubble-color: <%= @bubble.color %>;">
<%= render_comments_and_boosts(@bubble) %>
<%= render "comments/new" %>
</section>