Files
fizzy/app/views/bubbles/list/_bubble.html.erb
T
2025-01-31 17:24:00 -06:00

43 lines
2.2 KiB
Plaintext

<li class="<%= class_names("flex align-center gap-half margin-none", drafted: bubble.drafted?) %>" style="--bubble-color: <%= bubble.color %>; <%= bubble_rotation(bubble) %>"
data-controller="animation" data-animation-play-class="bubble--wobble" data-animation-play-on-load-value="true" data-action="mouseover->animation#play">
<%= link_to bucket_bubble_path(bubble.bucket, bubble), class: "flex-item-no-shrink" do %>
<div class="bubble__shape flex-item-no-shrink"></div>
<% end %>
<div class="flex flex-column flex-item-grow min-width">
<div class="flex align-center gap-half margin-none">
<div class="flex flex-column min-width">
<div class="flex align-center gap-half max-width full-width">
<%= link_to bucket_bubble_path(bubble.bucket, bubble), class: "bubble__title-link flex-item-grow max-width overflow-ellipsis" do %>
<strong class="bubble__title-text"><%= bubble.title %></strong>
<% end %>
<% if bubble.messages.many? %>
<span class="translucent txt-nowrap flex-item-no-shrink">(<%= bubble.messages.count %>)</span>
<% end %>
<span class="flex-item-no-shrink flex">
<% bubble.assignees.each do |assignee| %>
<%= link_to bubbles_path(@filter.as_params.merge(assignee_ids: [ assignee.id ])), class: "btn avatar", style: "font-size: 0.4em;" do %>
<%= avatar_image_tag assignee, loading: :lazy %>
<% end %>
<% end %>
</span>
</div>
</div>
<hr class="separator--horizontal flex-item-grow" aria-hidden="true" style="--border-color: var(--color-subtle-dark); --border-style: dotted" />
<% if bubble.due_on.present? %>
<strong class="txt-nowrap txt-small" style="color: <%= bubble.color %>">
<%= local_datetime_tag bubble.due_on, style: :shortdate %>
</strong>
<% end %>
</div>
<div class="flex gap-half txt-small full-width min-width">
<span class="overflow-ellipsis"><%= "Added by #{bubble.creator.name} on" %> <%= local_datetime_tag bubble.created_at, style: :shortdate %></span>
<span class="flex-item-no-shrink"><%= render "bubbles/tags", bubble: bubble %></span>
</div>
</div>
</li>