Remove las sibling selector from search
This commit is contained in:
parent
a49f4bf130
commit
6d3deb28fe
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
js/application.min.js
vendored
2
js/application.min.js
vendored
File diff suppressed because one or more lines are too long
@ -77,7 +77,13 @@ if ( ! $skip_author_keywords ) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form role="search" method="get" class="search-form <?php if ( ! $show_advanced ) echo '_simple'; ?>" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
<form
|
||||||
|
role="search"
|
||||||
|
method="get"
|
||||||
|
class="search-form <?php if ( ! $show_advanced ) echo '_simple'; ?>"
|
||||||
|
action="<?php echo esc_url( home_url( '/' ) ); ?>"
|
||||||
|
data-advanced="false"
|
||||||
|
>
|
||||||
|
|
||||||
<?php if ( $show_advanced ) : ?>
|
<?php if ( $show_advanced ) : ?>
|
||||||
<div class="allow-list" hidden><?php echo json_encode( $allow_list ); ?></div>
|
<div class="allow-list" hidden><?php echo json_encode( $allow_list ); ?></div>
|
||||||
|
@ -1767,6 +1767,13 @@ _$$('.search-form').forEach(form => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_$('.search-form__advanced-control')?.addEventListener(
|
||||||
|
'change',
|
||||||
|
event => {
|
||||||
|
event.currentTarget.closest('form').dataset.advanced = event.currentTarget.checked;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// DETECT KEYBOARD USER (UNNECESSARILY COMPLICATED EDITION)
|
// DETECT KEYBOARD USER (UNNECESSARILY COMPLICATED EDITION)
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
.search-form[data-advanced="false"] {
|
||||||
|
.search-form__advanced {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-form[data-advanced="true"] {
|
||||||
|
.search-form__bar .search-form__advanced-toggle {
|
||||||
|
color: var(--fg-600);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-form__current {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.search-form {
|
.search-form {
|
||||||
&._simple {
|
&._simple {
|
||||||
.search-form__bar input {
|
.search-form__bar input {
|
||||||
@ -155,24 +171,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-control {
|
|
||||||
&:not(:checked) {
|
|
||||||
~ .search-form__advanced {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:checked {
|
|
||||||
+ .search-form__bar .search-form__advanced-toggle {
|
|
||||||
color: var(--fg-600);
|
|
||||||
}
|
|
||||||
|
|
||||||
~ .search-form__current {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&-actions {
|
&-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user