Files
fizzy/app/views/comments/_body.html.erb
T
2025-02-18 17:08:56 -06:00

25 lines
1.2 KiB
Plaintext

<%= turbo_frame_tag dom_id(comment) do %>
<div class="comment__content flex-inline flex-column full-width border-radius">
<div class="comment__author flex align-center gap-half">
<strong><%= link_to comment.creator.name, user_path(comment.creator), class: "txt-ink btn btn--plain fill-transparent", data: { turbo_frame: "_top" } %></strong>
<%= link_to bucket_bubble_path(comment.bubble.bucket, comment.bubble, anchor: "comment_#{comment.id}"), class: "txt-undecorated" do %>
<%= local_datetime_tag comment.created_at, style: :shortdate, class: "comment__timestamp" %>
<% end %>
<% if comment.creator == Current.user %>
<%= link_to edit_bucket_bubble_comment_path(comment.bubble.bucket, comment.bubble, comment), class: "btn txt-small btn--plain fill-transparent", style: "font-size: 0.4em; opacity: 0.5;" do %>
<%= image_tag "menu-dots-horizontal.svg", class: "icon colorize--black" %>
<span class="for-screen-reader">Edit</span>
<% end %>
<% end %>
</div>
<div class="comment__body txt-align-start">
<%= sanitize comment.body_html %>
</div>
<div id="reactions">
<%= render "comments/reactions/reactions", comment: comment %>
</div>
</div>
<% end %>