mirror of
https://github.com/caddyserver/website.git
synced 2025-04-26 23:16:16 -04:00
docsearch: Upgrade to v3 (#231)
See: - https://docsearch.algolia.com/docs/DocSearch-v3 - https://docsearch.algolia.com/docs/migrating-from-v2
This commit is contained in:
parent
42d97e9a14
commit
e0541c0f3f
6 changed files with 29 additions and 32 deletions
|
@ -82,29 +82,18 @@ header nav > a.current {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Algolia search */
|
||||
/* Algolia DocSearch */
|
||||
#search {
|
||||
border-radius: 5px;
|
||||
border: 1px solid rgba(0, 0, 0, .2);
|
||||
font-size: 14px;
|
||||
padding: 8px;
|
||||
background: none;
|
||||
width: 200px;
|
||||
max-width: 100%;
|
||||
margin-right: 20px;
|
||||
margin-top: 4px;
|
||||
outline: none;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#search:focus {
|
||||
background: #fff;
|
||||
.DocSearch-Container {
|
||||
color: initial;
|
||||
}
|
||||
|
||||
.algolia-autocomplete .ds-dropdown-menu {
|
||||
width: 90%;
|
||||
max-width: 800px;
|
||||
.DocSearch-Footer {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* End Algolia search */
|
||||
/* End Algolia DocSearch */
|
||||
|
||||
header nav .new {
|
||||
background-color: #ffe300;
|
||||
|
|
|
@ -918,13 +918,16 @@ td code {
|
|||
color: black;
|
||||
}
|
||||
|
||||
/* Algolia DocSearch */
|
||||
#search {
|
||||
background: rgb(28, 52, 79);
|
||||
color: #bdd6f7;
|
||||
}
|
||||
#search:focus {
|
||||
background: rgb(46, 70, 96);
|
||||
--docsearch-searchbox-background: rgb(28, 52, 79);
|
||||
--docsearch-searchbox-focus-background: rgb(28, 52, 79);
|
||||
--docsearch-text-color: #bdd6f7;
|
||||
--docsearch-muted-color: #96a9c4;
|
||||
--docsearch-key-gradient: linear-gradient(-26.5deg, #060e17 0%, rgb(47, 62, 72) 100%);
|
||||
--docsearch-key-shadow: inset 0 -2px 0 0 #4c4c56, inset 0 0 1px 1px rgb(70, 70, 70), 0 1px 2px 1px rgba(77, 79, 91, 0.4);
|
||||
}
|
||||
/* End Algolia DocSearch */
|
||||
|
||||
#paper1,
|
||||
#paper2 {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Algolia search
|
||||
docsearch({
|
||||
appId: "BH4D9OD16A",
|
||||
apiKey: '14275a785f6ebd31d162f9d2d8fc0125',
|
||||
indexName: 'caddyserver',
|
||||
inputSelector: '#search',
|
||||
debug: false // Set debug to true if you want to inspect the dropdown
|
||||
container: '#search',
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -33,4 +33,4 @@ function moduleDocsPreview(mod, maxLen) {
|
|||
short = short.substr(mod.name.length).trim();
|
||||
}
|
||||
return short;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue