<% @page_title = "Home" %> <% content_for :header do %> <% end %>

<% if @filter.collections.any? %> <%= filter_selected_collections_label(@filter) %> <% else %> <%= Account.sole.name %> / Latest activity <% if @filter.creators.any? %> by <%= @filter.creators.each_with_object([]) { |creator, names| names << creator.familiar_name }.to_sentence %> <% end %> <% end %>
<% if @filter.creators.any? %> <%= link_to events_path(@filter.as_params.except(:creator_ids)), class: "btn btn--remove txt-xx-small margin-inline-start" do %> <%= icon_tag "close" %> Clear all <% end %> <% end %>

<% if collection = @filter.single_collection || Current.user.collections.first %> <%= button_to collection_cards_path(collection), method: :post, class: "btn btn--link txt-x-small margin-block-end-double", form_class: "center" do %> <%= icon_tag "add" %> Add a card <% end %> <% end %>
<%= render "events/day", day_timeline: @day_timeline %> <%= event_next_page_link(@day_timeline.next_day) %>