From 6d60cfa86a52083e57f32066374f9c4a6f6be64d Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 17 Oct 2022 20:48:30 +0100 Subject: [PATCH] update full-search.js (mostly CSS classes). Because I copied over the code from my co-web project, the code in this file has CSS classes referring to that project. This commit updates those classes to fall in-line with the CSS/design of this website. --- static/js/full-search.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/static/js/full-search.js b/static/js/full-search.js index 76e1abf..94f722b 100644 --- a/static/js/full-search.js +++ b/static/js/full-search.js @@ -2,7 +2,7 @@ Full Search ================================================================================ This file's main focus in providing the Meilisearch features to the -search/index.html template. +search.html template. For more information on Meilisearch, use: @@ -41,7 +41,7 @@ const search = instantsearch({ search.addWidgets([ instantsearch.widgets.searchBox({ container: "#searchbox", - placeholder: "Search...", + placeholder: "Search the archive here...", }), instantsearch.widgets.clearRefinements({ container: "#clear-refinements" @@ -59,7 +59,7 @@ search.addWidgets([ attribute: "keywords" }), instantsearch.widgets.configure({ - hitsPerPage: 30, + hitsPerPage: 50, snippetEllipsisText: "...", attributesToSnippet: ["title:100"] }), @@ -67,20 +67,18 @@ search.addWidgets([ container: "#hits", templates: { item: ` - +
-
- +
+ {{#helpers.highlight}}{"attribute": "title"}{{/helpers.highlight}} - -{{#helpers.highlight}}{"attribute": "year"}{{/helpers.highlight}} - - + {{#helpers.highlight}}{"attribute": "month"}{{/helpers.highlight}} +{{#helpers.highlight}}{"attribute": "year"}{{/helpers.highlight}} - + {{keywords}}