diff --git a/src/lib/DocSearch.js b/src/lib/DocSearch.js
index 17bee6d8..4cd8d51b 100644
--- a/src/lib/DocSearch.js
+++ b/src/lib/DocSearch.js
@@ -304,11 +304,6 @@ class DocSearch {
return suggestion => template.render(suggestion);
}
- handleSelected(input, event, suggestion) {
- input.setVal('');
- window.location.assign(suggestion.url);
- }
-
handleShown(input) {
const middleOfInput = input.offset().left + input.width() / 2;
let middleOfWindow = $(document).width() / 2;
diff --git a/src/lib/templates.js b/src/lib/templates.js
index 7eaf7641..19230437 100644
--- a/src/lib/templates.js
+++ b/src/lib/templates.js
@@ -1,15 +1,19 @@
const prefix = 'algolia-docsearch';
const suggestionPrefix = `${prefix}-suggestion`;
const footerPrefix = `${prefix}-footer`;
+const searchByAddress =
+ 'https://www.algolia.com/static_assets/images/v3/shared/logos/algolia/search-by-algolia-light-background-8762ce8b.svg';
/* eslint-disable max-len */
const templates = {
suggestion: `
-
+ "
+ target="_blank" rel="noopener noreferrer" href="{{{url}}}"
+ >
@@ -25,7 +29,7 @@ const templates = {
{{/isTextOrSubcategoryNonEmpty}}
-
+
`,
suggestionSimple: `
`,
empty: `
diff --git a/src/styles/_dropdown.scss b/src/styles/_dropdown.scss
index a161e7a1..cdae6b17 100644
--- a/src/styles/_dropdown.scss
+++ b/src/styles/_dropdown.scss
@@ -177,6 +177,9 @@
position: relative;
z-index: 1000;
margin-top: $padding/2;
+ & a:hover {
+ text-decoration: none;
+ }
}
.ds-suggestion {
@@ -212,6 +215,7 @@
// Each suggestion item is wrapped
.algolia-docsearch-suggestion {
+ display: block;
position: relative;
padding: 0 $padding/2;
background: $background-color;
@@ -223,12 +227,6 @@
color: $main-color;
background-color: rgba($main-color, $highlight-opacity);
}
-
- .algolia-docsearch-suggestion--item-header
- .algolia-docsearch-suggestion--highlight {
- color: inherit;
- background: inherit;
- }
} @else {
&--highlight {
color: set-highlight($highlight-opacity, $main-color);
@@ -242,8 +240,10 @@
&--category-header
.algolia-docsearch-suggestion--category-header-lvl1
.algolia-docsearch-suggestion--highlight {
- color: inherit;
+ padding: 0 0 1px;
background: inherit;
+ box-shadow: inset 0 -2px 0 0 rgba($main-color, 0.8);
+ color: inherit;
}
&--text .algolia-docsearch-suggestion--highlight {
@@ -311,11 +311,6 @@
background: #ddd;
right: 0;
}
-
- .algolia-docsearch-suggestion--highlight {
- background-color: inherit;
- color: inherit;
- }
}
&--subcategory-inline {
@@ -355,9 +350,6 @@
background-color: $code-background;
border-radius: 3px;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
- .algolia-docsearch-suggestion--highlight {
- background: none;
- }
}
// Rules to display categories and subcategories
@@ -500,8 +492,8 @@
// powered by
.algolia-docsearch-footer {
- width: 110px;
- height: 20px;
+ width: 30%;
+ height: 25px;
z-index: 2000;
margin-top: $padding/1.5;
float: right;
@@ -509,13 +501,6 @@
line-height: 0;
&--logo {
- background-image: url("data:image/svg+xml;utf8,");
- background-repeat: no-repeat;
- background-position: center;
- background-size: 100%;
- overflow: hidden;
- text-indent: -9000px;
- padding: 0 !important;
width: 100%;
height: 100%;
display: block;