Adding upstream version 5.2.3+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
b80f12a01d
commit
bc475d7d0d
617 changed files with 89471 additions and 0 deletions
47
site/assets/js/search.js
Normal file
47
site/assets/js/search.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||
// IT'S ALL JUST JUNK FOR OUR DOCS!
|
||||
// ++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
(() => {
|
||||
'use strict'
|
||||
|
||||
const searchElement = document.getElementById('docsearch')
|
||||
|
||||
if (!window.docsearch || !searchElement) {
|
||||
return
|
||||
}
|
||||
|
||||
const siteDocsVersion = searchElement.getAttribute('data-bd-docs-version')
|
||||
|
||||
window.docsearch({
|
||||
apiKey: '3151f502c7b9e9dafd5e6372b691a24e',
|
||||
indexName: 'bootstrap',
|
||||
appId: 'AK7KMZKZHQ',
|
||||
container: searchElement,
|
||||
searchParameters: {
|
||||
facetFilters: [`version:${siteDocsVersion}`]
|
||||
},
|
||||
transformItems(items) {
|
||||
return items.map(item => {
|
||||
const liveUrl = 'https://getbootstrap.com/'
|
||||
|
||||
item.url = window.location.origin.startsWith(liveUrl) ?
|
||||
// On production, return the result as is
|
||||
item.url :
|
||||
// On development or Netlify, replace `item.url` with a trailing slash,
|
||||
// so that the result link is relative to the server root
|
||||
item.url.replace(liveUrl, '/')
|
||||
|
||||
// Prevent jumping to first header
|
||||
if (item.anchor === 'content') {
|
||||
item.url = item.url.replace(/#content$/, '')
|
||||
item.anchor = null
|
||||
}
|
||||
|
||||
return item
|
||||
})
|
||||
},
|
||||
// Set debug to `true` if you want to inspect the dropdown
|
||||
debug: false
|
||||
})
|
||||
})()
|
Loading…
Add table
Add a link
Reference in a new issue