2023-04-21 15:31:46 +00:00
|
|
|
.hyphens{ lang: site.default_locale }
|
|
|
|
%h1= site.title
|
|
|
|
%p.lead= site.description
|
2024-02-29 18:17:47 +00:00
|
|
|
%form.mb-3{ action: site_posts_path }
|
2024-06-04 16:58:53 +00:00
|
|
|
- filter_params.each do |param, values|
|
2024-04-29 17:08:07 +00:00
|
|
|
- next if param == :q
|
2024-06-04 15:49:37 +00:00
|
|
|
|
2024-04-29 17:08:07 +00:00
|
|
|
- [values].flatten.each do |value|
|
2024-06-04 15:49:37 +00:00
|
|
|
%input{ type: 'hidden',
|
|
|
|
name: values.is_a?(Array) ? "#{param}[]" : param,
|
|
|
|
value: value }
|
2024-02-20 17:09:46 +00:00
|
|
|
.form-group.flex-grow-0.m-0
|
2024-06-04 15:49:37 +00:00
|
|
|
%label.h3{ for: 'q' }= t('posts.index.search')
|
2024-02-29 18:17:47 +00:00
|
|
|
.input-group
|
2024-06-04 15:49:37 +00:00
|
|
|
%input.form-control.border.border-magenta.border-right-0#q{ type: 'search',
|
|
|
|
name: 'q',
|
2024-06-04 16:58:53 +00:00
|
|
|
value: filter_params[:q] }
|
2024-02-29 18:17:47 +00:00
|
|
|
.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
|
2024-02-20 17:09:46 +00:00
|
|
|
%input.sr-only{ type: 'submit' }
|
2024-06-04 16:58:53 +00:00
|
|
|
- filter_params.each do |param, values|
|
2024-04-29 16:34:16 +00:00
|
|
|
- [values].flatten.each do |value|
|
2024-06-04 16:58:53 +00:00
|
|
|
= link_to site_posts_path(site, **filter_params_by(filter_params, param, value)),
|
2024-06-04 15:49:37 +00:00
|
|
|
class: 'btn btn-secondary btn-sm',
|
|
|
|
title: t('posts.remove_filter_help', filter: value),
|
|
|
|
aria: { labelledby: "help-filter-#{param}" } do
|
2024-04-29 17:07:03 +00:00
|
|
|
- if param == :layout
|
2024-06-04 16:58:53 +00:00
|
|
|
= site.layouts[value.to_sym].humanized_name
|
2024-04-29 17:07:03 +00:00
|
|
|
- else
|
|
|
|
= value
|
2024-04-29 16:34:16 +00:00
|
|
|
×
|