From 2515803ce0ead16f5aebc944399cec6f22f7c369 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 17 Oct 2022 20:49:54 +0100 Subject: [PATCH] update quick-search.js (minor URL and CSS changes). This file has been in the repo. for a while -- I copied it over from my co-web project. But, I hadn't touched it or integrated into this website until now. The changes in this commit are mostly minor changes which bring the URL's for the Meilisearch instance this website connects to and change the CSS classes to match the ones used in this project (and not my co-web) project. --- static/js/quick-search.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/quick-search.js b/static/js/quick-search.js index c7faa87..7ca3f09 100644 --- a/static/js/quick-search.js +++ b/static/js/quick-search.js @@ -20,16 +20,16 @@ let apiKey = ""; if (location.hostname === "localhost" || location.hostname === "127.0.0.1" - || location.hostname === "beta.craigoates.net") { - server = "http://beta-search.craigoates.net"; + || location.hostname === "beta.nera.com") { + server = "http://localhost:7700"; apiKey= "meilisearch-beta-key"; } else { - server = "https://search.craigoates.net"; + server = "https://www.nera.com"; apiKey = "meilisearch-production-key-26-07-2022"; } const search = instantsearch({ - indexName: "project", + indexName: "nera", searchClient: instantMeiliSearch( server, apiKey, @@ -50,7 +50,7 @@ search.addWidgets([ container: "#hits", templates: { item: ` - + {{#helpers.highlight}}{"attribute": "title"}{{/helpers.highlight}}