Files
fizzy/app/views/bubbles/index.html.erb
T
2024-11-19 12:06:35 -06:00

38 lines
1.4 KiB
Plaintext

<% @page_title = @filter.plain_summary %>
<% content_for :header do %>
<nav class="align-start">
<%= link_to root_path, class: "btn flex-item-justify-start" do %>
<%= image_tag "arrow-left.svg", aria: { hidden: true }, size: 24 %>
<span class="for-screen-reader">Go back</span>
<% end %>
<header class="txt-align-center">
<%= render "bubbles/filters", filter: @filter %>
</header>
<% if @filter.buckets.any? %>
<%= button_to bucket_bubbles_path(@filter.buckets.first), method: :post, class: "btn", form_class: "flex-item-justify-end" do %>
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
<span class="for-screen-reader">Create a new bubble</span>
<% end %>
<% else %>
<span class="btn btn--placeholder flex-item-justify-end"></span>
<% end %>
</nav>
<% end %>
<section class="windshield flex-inline flex-wrap gap justify-center align-end" style="view-transition-name: windshield_<%= params[:filter_id] %>">
<% if @bubbles.any? %>
<%= render partial: "bubbles/bubble", collection: @bubbles.limit(10), cached: true %>
<% else %>
<p><strong>Nothing here.</strong></p>
<% end %>
</section>
<section class="bubbles-list unpad-inline center margin-block-start">
<ul class="unpad margin-none flex flex-column txt-align-start center">
<%= render partial: "bubbles/list/bubble", collection: @bubbles, cached: true %>
</ul>
</section>