Skip to content

Commit 799f789

Browse files
committed
All: Switch from .tsmb-form to <typesense-minibar>
Ref https://github.com/jquery/typesense-minibar.
1 parent f1fde96 commit 799f789

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

themes/jquery/css/base.css

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ nav#main li.current a {
12361236
font-family: "Lucida Grande", Lucida, Verdana, sans-serif;
12371237
}
12381238

1239-
.tsmb-form {
1239+
typesense-minibar {
12401240
--tsmb-size-radius: 5px;
12411241
--tsmb-size-base: 12px;
12421242
--tsmb-size-sm: 0.8rem;
@@ -1252,29 +1252,29 @@ nav#main li.current a {
12521252
--tsmb-color-primary50: #0769ad; /* jQuery Primary Blue */
12531253
--tsmb-color-primary90: #b4efff; /* oklch(0.92 0.07 228) hue=228 of #7ACEF4 (jQuery Secondary Blue) */
12541254
}
1255-
.jquery-ui .tsmb-form {
1255+
.jquery-ui typesense-minibar {
12561256
--tsmb-color-primary50: #b24926; /* jQuery UI Secondary Orange */
12571257
--tsmb-color-primary90: #ffddb2; /* = #b4efff + oklch(hue=70) of #FAA523 (jQuery UI Primary Orange) */
12581258
}
1259-
.jquery-mobile .tsmb-form {
1259+
.jquery-mobile typesense-minibar {
12601260
--tsmb-color-primary50: #108040; /* jQuery Mobile Secondary Green */
12611261
--tsmb-color-primary90: #c9f2c8; /* = #b4efff + oklch(hue=144) of #3EB249 (jQuery UI Primary Orange) */
12621262
}
1263-
.jquery-foundation .tsmb-form {
1263+
.jquery-foundation typesense-minibar {
12641264
--tsmb-color-primary50: #333; /* jQuery Black */
12651265
--tsmb-color-primary90: #ccc;
12661266
}
1267-
.jquery-learn .tsmb-form {
1267+
.jquery-learn typesense-minibar {
12681268
--tsmb-color-primary50: #222;
12691269
--tsmb-color-primary90: #ccc;
12701270
}
1271-
.tsmb-form:not(:focus-within)::before {
1271+
typesense-minibar form:not(:focus-within)::before {
12721272
filter: invert();
12731273
}
1274-
.tsmb-form input[type=search] {
1274+
typesense-minibar input[type=search] {
12751275
border-width: 0;
12761276
}
1277-
.tsmb-form [role="option"] mark {
1277+
typesense-minibar[role="option"] mark {
12781278
border-bottom: 2px solid var(--tsmb-color-primary90);
12791279
}
12801280

themes/jquery/header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/i/favicon.ico">
2121
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/lib/typesense-minibar/typesense-minibar.css?v=1.3.2">
22-
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/base.css?v=16">
22+
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/base.css?v=17">
2323
<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>?v=8">
2424

2525
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>

themes/jquery/searchform.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* The template for displaying search forms
44
*/
55
?>
6-
<form role="search" class="searchform tsmb-form" action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get"<?php
6+
<typesense-minibar<?php
77
if ( jq_search_get_provider() === 'typesense' ) :
88
$typesenseKey = get_option( 'jquery_typesense_key' );
99
$typesenseCollection = get_option( 'jquery_typesense_collection' );
@@ -15,6 +15,8 @@
1515
<?php
1616
endif;
1717
?>>
18+
<form role="search" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" method="get">
1819
<input type="search" name="s" aria-label="Search <?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" value="<?php echo get_search_query(); ?>" placeholder="Search" autocomplete="off">
1920
<button type="submit" class="visuallyhidden"></button>
2021
</form>
22+
</typesense-minibar>

0 commit comments

Comments
 (0)