Skip to content

Commit 52093bb

Browse files
committed
when focus is on search, dont highlight menu
1 parent cdef439 commit 52093bb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

layouts/index.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
width: 100%;
2121
height: 200vh;
2222
background-color: rgba(0, 0, 0, 0.35);
23-
z-index: 1000;
23+
z-index: 11000;
2424
}
2525

2626
.algolia-search {
27-
z-index: 5000;
27+
&.isfocused {
28+
z-index: 12000;
29+
}
2830
position: relative;
2931
.search-panel {
3032
display: block;
@@ -217,6 +219,7 @@ <h3 class="color-blue search-result-title">${item._highlightResult.title.value}<
217219
docReady(function () {
218220
$("input.ais-SearchBox-input").on("focus", function () {
219221
$(".algolia-search").addClass("bg-lightblue");
222+
$(".algolia-search").addClass("isfocused");
220223
$("#hits").addClass("d-block");
221224
$("#hits").removeClass("d-none");
222225
$(".search-overlay").removeClass("d-none");
@@ -225,6 +228,7 @@ <h3 class="color-blue search-result-title">${item._highlightResult.title.value}<
225228

226229
$(".search-overlay").on("click", function () {
227230
$(".algolia-search").removeClass("bg-lightblue");
231+
$(".algolia-search").removeClass("isfocused");
228232
$("#hits").removeClass("d-block");
229233
$("#hits").addClass("d-none");
230234
$(".search-overlay").addClass("d-none");

0 commit comments

Comments
 (0)