.hyphens{ lang: site.default_locale } %h1= site.title %p.lead= site.description %form.mb-3{ action: site_posts_path } - filter_params.each do |param, values| - next if param == :q - [values].flatten.each do |value| %input{ type: 'hidden', name: values.is_a?(Array) ? "#{param}[]" : param, value: value } .form-group.flex-grow-0.m-0.mb-1 %label.h3{ for: 'q' }= t('posts.index.search') .input-group %input.form-control.border.border-magenta.border-right-0#q{ type: 'search', name: 'q', value: filter_params[:q] } .input-group-append %span.input-group-text.background-white.magenta.border.border-magenta.border-top.border-left-0.border-right.border-bottom %i.fa.fa-fw.fa-search %input.sr-only{ type: 'submit' } - filter_params.each do |param, values| .d-flex.flex-wrap - [values].flatten.each do |value| - humanized_name = site.layouts[value.to_sym].humanized_name = link_to site_posts_path(site, **filter_params_by(filter_params, param, value)), class: 'btn btn-secondary btn-sm-queries', title: humanized_name, aria: { labelledby: "help-filter-#{param}" } do - if param == :layout %span= humanized_name - else = value %span ×