<% if @projects.any? %>
  <section class="container mt-5">
    <div class="d-flex flex-row justify-content-between align-items-center mb-3">
      <h1 class="h3"><%= t(".heading") %> (<%= @projects.size %>)</h1>
      
      <%= bootstrap_form_with url: [@account, :projects], method: :get, remote: true, layout: :inline, id: "search" do |form| %>
        <%= form.search_field :query, hide_label: true, placeholder: t(".actions.search"), class: "rounded-pill-right", value: params[:query], prepend: form.button(fa_icon("search"), class: "btn btn-light border rounded-pill-left") %>
      <% end %>
    </div>
    <ul id="projects" class="list-unstyled mt-2 row">
      <%= render partial: "new_project_button" %>
      <%= render @projects %>
    </ul>
  </section>
<% else %>
  <%= render "empty_projects" %>
<% end %>
