From 1da8b90340235753b935a880d797cb796700d151 Mon Sep 17 00:00:00 2001 From: sptaule Date: Thu, 27 Jan 2022 18:10:37 +0100 Subject: Doc refactor, doc and index QoL, fix search: working on every page --- static/images/garage-logo-horizontal.svg | 132 +++++++++++++++++++++++++++++++ static/images/garage-logo-simple.svg | 98 +++++++++++++++++++++++ static/js/site.js | 6 +- 3 files changed, 234 insertions(+), 2 deletions(-) create mode 100644 static/images/garage-logo-horizontal.svg create mode 100644 static/images/garage-logo-simple.svg (limited to 'static') diff --git a/static/images/garage-logo-horizontal.svg b/static/images/garage-logo-horizontal.svg new file mode 100644 index 0000000..9bf3293 --- /dev/null +++ b/static/images/garage-logo-horizontal.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/images/garage-logo-simple.svg b/static/images/garage-logo-simple.svg new file mode 100644 index 0000000..85f5e19 --- /dev/null +++ b/static/images/garage-logo-simple.svg @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 ( - `` + + `` + `

` + `${item.doc.title}` + `

` + `
` + `${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; } -- cgit v1.2.3