aboutsummaryrefslogtreecommitdiff
path: root/static/js/site.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/site.js')
-rwxr-xr-xstatic/js/site.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/static/js/site.js b/static/js/site.js
index f764289..d8e0d69 100755
--- a/static/js/site.js
+++ b/static/js/site.js
@@ -112,7 +112,7 @@ function makeTeaser(body, terms) {
function formatSearchResultItem(item, terms) {
return (
- `<a href='${item.ref}' class='group flex flex-col space-y-2 hover:bg-gray-100 p-2 rounded'>` +
+ `<a href='${item.ref}' class='group flex flex-col space-y-2 hover:bg-gray-100 p-2 rounded focus:outline outline-garage-orange'>` +
`<h1 class='text-garage-orange font-semibold'>` + `${item.doc.title}` + `</h1>` +
`<div class='content mt-2'>` +
`${makeTeaser(item.doc.body, terms)}` +
@@ -168,9 +168,11 @@ function search() {
}
function openSearchModal() {
+ var baseUrl = window.location.protocol + "//" + window.location.host;
+ var indexScriptPath = baseUrl + '/search_index.en.js';
if (indexScriptLoaded === false) {
var indexScript = document.createElement('script');
- indexScript.setAttribute('src', './search_index.en.js');
+ indexScript.setAttribute('src', indexScriptPath);
document.head.appendChild(indexScript);
indexScriptLoaded = true;
}