Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 46a383b

Browse files
committed
Merge branch 'master' into update-extension-with-sections
2 parents 75a0cd9 + 85a57b0 commit 46a383b

File tree

4 files changed

+19
-24
lines changed

4 files changed

+19
-24
lines changed

sphinx_search/_static/css/rtd_sphinx_search.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
width: 90%;
123123
margin-bottom: 15px;
124124
}
125+
125126
.search__outer .bar:before,
126127
.search__outer .bar:after {
127128
content: "";
@@ -132,9 +133,11 @@
132133
background: #5264ae;
133134
transition: 0.2s ease all;
134135
}
136+
135137
.search__outer .bar:before {
136138
left: 50%;
137139
}
140+
138141
.search__outer .bar:after {
139142
right: 50%;
140143
}
@@ -167,12 +170,7 @@
167170
cursor: pointer;
168171
}
169172

170-
/* Helper class */
171-
172-
.display-block {
173-
display: block;
174-
animation: fade-in 0.4s;
175-
}
173+
/* Title of each search result */
176174

177175
.search__result__title {
178176
/* Display and box model */
@@ -211,6 +209,8 @@
211209
text-align: left;
212210
}
213211

212+
/* Highlighting of matched results */
213+
214214
.search__outer em {
215215
font-style: normal;
216216
}

sphinx_search/_static/css/rtd_sphinx_search.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sphinx_search/_static/js/rtd_sphinx_search.js

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -562,17 +562,16 @@ const showSearchModal = () => {
562562
let search_bar = getInputField();
563563
search_bar.blur();
564564

565-
let search_outer_wrapper = document.querySelector(
566-
".search__outer__wrapper"
567-
);
568-
search_outer_wrapper.classList.add("display-block");
569-
570-
// sets the value of the input field to empty string and focus it.
571-
let search_outer_input = document.querySelector(".search__outer__input");
572-
if (search_outer_input !== null) {
573-
search_outer_input.value = "";
574-
search_outer_input.focus();
575-
}
565+
$(".search__outer__wrapper").fadeIn(400, () => {
566+
// sets the value of the input field to empty string and focus it.
567+
let search_outer_input = document.querySelector(
568+
".search__outer__input"
569+
);
570+
if (search_outer_input !== null) {
571+
search_outer_input.value = "";
572+
search_outer_input.focus();
573+
}
574+
});
576575
};
577576

578577
/**
@@ -589,11 +588,7 @@ const removeSearchModal = () => {
589588
search_outer_input.blur();
590589
}
591590

592-
// sets display="none" to fianlly hide the modal.
593-
let search_outer_wrapper = document.querySelector(
594-
".search__outer__wrapper"
595-
);
596-
search_outer_wrapper.classList.remove("display-block");
591+
$(".search__outer__wrapper").fadeOut(400);
597592
};
598593

599594
window.addEventListener("DOMContentLoaded", evt => {

0 commit comments

Comments
 (0)