-page_title("Busca")
#ContentList
.container.bgWhite
%section
.row.justify-content-center
.line-top.py-2
.col-12.text-center
%h1.text-uppercase Busca
-#
%nav#breadcrumb.bgWhite.bg
.container-fluid
.container.p-0
.row.align-items-center.p-0
.col-12.col-sm-12.col-md-9.p-0
%nav.breadcrumb.bgTransparent.mb-0.d-flex.align-items-center
= link_to "home", "/", class:"breadcrumb-item active"
-# = render '/pages/breadcrumbs'
-#
.container.mt-4.mt-sm-0
= form_tag search_content_path, method: :get do
.row
.col-12.col-md-11.text-right
= text_field_tag :q, params[:q], class:"form-control", placeholder:"O que você está buscando?", id:"busca_input"
.col-12.col-md-1.text-left
= submit_tag 'Buscar', class: 'btn btn-secondary'
.row
.col-12.pt-3.p-md-4
- if @contents.total_count == 1
%h4 Foi encontrado #{@contents.total_count} resultado para o termo #{params[:q]}
- elsif @contents.total_count > 1
%h4 Foram encontrados #{@contents.total_count} resultados para o termo #{params[:q]}
- else
%h4 Nenhum resultado encontrado para para o termo #{params[:q]}
%main#list
.row
.card-group
- @contents.each do |content|
.col-sm-12.col-md-6.col-lg-4.col-xl-3.d-md-flex.pb-4
= render '/layouts/site/card_generic', content: content, section_css_class: content.css_class
.row
.col.text-center
= paginate @contents