From 0ee02bbe37d2368e588c6dd4a6690149d1360994 Mon Sep 17 00:00:00 2001 From: Ethan Yoo Date: Thu, 29 Dec 2022 09:55:43 -0500 Subject: [PATCH] Add fixedsearch.js and (non-minimized) Fuse.js files --- themes/geronimo/static/js/fixedsearch.js | 242 +++ themes/geronimo/static/js/fuse.js | 2240 ++++++++++++++++++++++ 2 files changed, 2482 insertions(+) create mode 100644 themes/geronimo/static/js/fixedsearch.js create mode 100644 themes/geronimo/static/js/fuse.js diff --git a/themes/geronimo/static/js/fixedsearch.js b/themes/geronimo/static/js/fixedsearch.js new file mode 100644 index 0000000..2337ca2 --- /dev/null +++ b/themes/geronimo/static/js/fixedsearch.js @@ -0,0 +1,242 @@ +// static/scripts/fixedsearch/fixedsearch.js +/*-------------------------------------------------------------- +fixedsearch — Super fast, client side search for Hugo.io with Fusejs.io +based on https://gist.github.com/cmod/5410eae147e4318164258742dd053993 +--------------------------------------------------------------*/ + +if (typeof variable !== 'undefined') { + console.log('fixedsearch.js already loaded'); +} else { +fixedsearch = function(){ + var search_form = document.getElementById('search-form'); // search form + var search_input = document.getElementById('search-input'); // input box for search + var search_submit = document.getElementById('search-submit'); // form submit button + var search_results = document.getElementById('search-results'); // targets the