31 lines
1.4 KiB
Plaintext
31 lines
1.4 KiB
Plaintext
<% bubble = event.summary.bubble %>
|
|
<% link = event.action == "commented" ? bucket_bubble_path(bubble.bucket, bubble, anchor: dom_id(event.comment)) : bucket_bubble_path(bubble.bucket, bubble) %>
|
|
|
|
<%= link_to link,
|
|
class: "event panel shadow center center-block flex-inline align-start justify-start gap position-relative",
|
|
style: "--bubble-color: #{ bubble.color }; #{ bubble_rotation(bubble) }",
|
|
data: { controller: "animation",
|
|
related_element_target: "related",
|
|
related_element_group_value: bubble.id,
|
|
animation_play_class: "bubble--wobble",
|
|
animation_play_on_load_value: "true",
|
|
action: "mouseover->animation#play mouseover->related-element#highlight mouseout->related-element#unhighlight" } do %>
|
|
<div class="avatar txt-x-small flex-item-no-shrink">
|
|
<%= avatar_image_tag(event.creator) %>
|
|
</div>
|
|
|
|
<div class="flex flex-column min-width txt-small align-start txt-align-start">
|
|
<strong class="event__title txt-break overflow-line-clamp">
|
|
<%= event_action_sentence(event) %>
|
|
</strong>
|
|
|
|
<% if event.action == "commented" && !strip_tags(event&.comment&.body_html).blank? %>
|
|
<span class="txt-break overflow-line-clamp txt-tight-lines">
|
|
<%= strip_tags(event.comment.body_html).truncate(200) -%>
|
|
</span>
|
|
<% end %>
|
|
|
|
<span class="event__bucket translucent"><%= bubble.bucket.name %></span>
|
|
</div>
|
|
<% end %>
|