49 lines
2.1 KiB
Plaintext
49 lines
2.1 KiB
Plaintext
<% @page_title = @filter.summary %>
|
|
|
|
<% turbo_refreshes_with method: :morph, scroll: :preserve %>
|
|
<%= render "filters/broadcasts", filter: @filter %>
|
|
|
|
<% content_for :header do %>
|
|
<nav class="align-start">
|
|
<%= link_to root_path, class: "btn", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
|
<%= image_tag "home.svg", aria: { hidden: true }, size: 24 %>
|
|
<span class="for-screen-reader">Home</span>
|
|
<% end %>
|
|
|
|
<div class="btn btn--placeholder flex-item-justify-start"></div>
|
|
|
|
<header class="flex flex-inline flex-column center flex-shrink txt--large">
|
|
<%= render "bubbles/filters", filter: @filter %>
|
|
</header>
|
|
|
|
<% if bucket = @filter.buckets.first %>
|
|
<%= link_to edit_bucket_path(bucket), class: "btn flex-item-justify-end" do %>
|
|
<%= image_tag "settings.svg", aria: { hidden: true }, size: 24 %>
|
|
<span class="for-screen-reader">Settings for <%= bucket.name %></span>
|
|
<% end %>
|
|
|
|
<%= button_to bucket_bubbles_path(bucket), method: :post, class: "btn" do %>
|
|
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
|
|
<span class="for-screen-reader">Create a new bubble</span>
|
|
<% end %>
|
|
<% else %>
|
|
<div class="btn btn--placeholder flex-item-justify-end"></div>
|
|
<div class="btn btn--placeholder"></div>
|
|
<% end %>
|
|
</nav>
|
|
<% end %>
|
|
|
|
<section class="cards gap position-relative" style="view-transition-name: cards-container;" data-controller="bubble-size" data-action="turbo:morph@window->bubble-size#resize">
|
|
<% if @bubbles.any? %>
|
|
<%= render "display_count_selector", display_count: @display_count, filter: @filter %>
|
|
<%= render partial: "bubbles/card", collection: @bubbles.limit(@display_count), as: :bubble, cached: true %>
|
|
<% else %>
|
|
<p class="txt-medium"><strong>Nothing here.</strong></p>
|
|
<% end %>
|
|
</section>
|
|
|
|
<section class="bubbles-list margin-block-start">
|
|
<ul class="unpad margin-none flex flex-column txt-align-start">
|
|
<%= render partial: "bubbles/list/bubble", collection: @bubbles.offset(@display_count), as: :bubble, cached: true %>
|
|
</ul>
|
|
</section> |