aboutsummaryrefslogtreecommitdiff
path: root/static/js/site.js
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-31 11:54:22 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-31 11:54:22 +0100
commit937245b202c200e1405209c59893d459b2194d2f (patch)
tree38dc667fb81be27b3b21e5cfccbf36d5fbc8fefd /static/js/site.js
parent4dde9b0855ad8edf5eef72036ee788aeeb5cd775 (diff)
parente5beba07d6b9e102cc28c7474b9db0ae11ec3c79 (diff)
downloadgaragehq.deuxfleurs.fr-937245b202c200e1405209c59893d459b2194d2f.tar.gz
garagehq.deuxfleurs.fr-937245b202c200e1405209c59893d459b2194d2f.zip
Merge branch 'master' of git.deuxfleurs.fr:sptl/garage_website
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;
}