-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12587 from jbonnier/dev/jubo/docsearch-by-algolia
chore(docsearch): Implement DocSearch by Algolia
- Loading branch information
Showing
9 changed files
with
2,068 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,45 @@ | ||
@import "../variables"; | ||
|
||
:root { | ||
--docsearch-primary-color: #{$blue} !important; | ||
--docsearch-logo-color: #{$blue} !important; | ||
} | ||
|
||
.sidefilter { | ||
top: 116px; | ||
z-index: 2; | ||
padding: 10px; | ||
background-color: transparent!important; | ||
|
||
#search { | ||
display: block; | ||
border-radius: 10px; | ||
input:focus { | ||
outline: none; | ||
border:2px solid #159bff; | ||
} | ||
} | ||
background-color: transparent; | ||
height: 60px; | ||
padding: 10px; | ||
|
||
#search-query { | ||
.DocSearch-Button { | ||
background: transparent; | ||
border: 2px inset $darkgray; | ||
border-radius: 6px; | ||
height: 45px; | ||
width: 100%; | ||
margin: 0; | ||
min-height: 45px; | ||
padding: 10px; | ||
width: 100%; | ||
} | ||
|
||
#search-results { | ||
background: white; | ||
position: absolute; | ||
margin:5px 0 0 0; | ||
width:560px; | ||
max-height: calc(100vh - 250px); | ||
border: 1px solid rgba(0,0,0,0.15); | ||
border-radius: 10px; | ||
box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.2); | ||
z-index: 1; | ||
overflow-y: auto; | ||
|
||
.sr-items { | ||
a { | ||
color: black; | ||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
p { | ||
margin: 10px; | ||
} | ||
|
||
.sr-item { | ||
display: block; | ||
padding: 15px; | ||
margin-bottom: 10px; | ||
&:hover{ | ||
background-image:linear-gradient(to bottom, rgba(21,155,255, 0.11) 0%, rgba(21,155,255, 0.11) 100%), linear-gradient(to bottom, rgba(21,155,255, 0.11) 0%, rgba(21,155,255, 0.11) 100%); | ||
} | ||
} | ||
|
||
.item-title { | ||
font-size: 16px; | ||
font-weight: bold; | ||
} | ||
.DocSearch-Button:active, .DocSearch-Button:focus, .DocSearch-Button:hover { | ||
border: 2px solid $blue; | ||
box-shadow: none; | ||
} | ||
|
||
.item-brief { | ||
font-size: 16px; | ||
color: black; | ||
} | ||
} | ||
.DocSearch-Button .DocSearch-Search-Icon { | ||
display: none; | ||
} | ||
|
||
@media (max-width: 767px) { | ||
width: 95%; | ||
overflow-y: scroll; | ||
max-height: 400px; | ||
} | ||
.DocSearch-Button-Placeholder { | ||
color: rgb(117, 117, 117); | ||
font-family: "Open Sans", sans-serif; | ||
font-size: 14px; | ||
line-height: 20px; | ||
padding: 10px; | ||
display: block; | ||
} | ||
} | ||
|
||
.DocSearch.DocSearch-Container { | ||
z-index: 9999; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
document.addEventListener("DOMContentLoaded",function(){initializeNavbar(),document.addEventListener("click",function(e){var n=e.target;980<=window.innerWidth||!n.matches("#navbar .has-children a")||(e.stopImmediatePropagation(),n.parentElement.classList.toggle("open"))},!0)},!1); | ||
// Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
document.addEventListener( | ||
"DOMContentLoaded", | ||
function () { | ||
|
||
initializeNavbar(); | ||
|
||
document.addEventListener( | ||
"click", | ||
function (e) { | ||
const t = e.target; | ||
if ( | ||
window.innerWidth >= 980 || | ||
!t.matches("#navbar .has-children a") | ||
) | ||
return; | ||
e.stopImmediatePropagation(); | ||
t.parentElement.classList.toggle("open"); | ||
}, | ||
true | ||
); | ||
}, | ||
false | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters