From 98ef1758d4915a3c84d5e7b9aa03af12ad14ad4d Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Thu, 26 May 2022 23:32:52 +0000 Subject: [PATCH] Update content/_index.md Co-authored-by: Steven Hall --- content/_index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/_index.md b/content/_index.md index ad5bb3a..51bd310 100644 --- a/content/_index.md +++ b/content/_index.md @@ -33,7 +33,12 @@ document.addEventListener('DOMContentLoaded', () => { el.hidden = !isMatch el.classList.toggle('matched-recipe', isMatch && searchText.length !== 0); artlist.classList.add('list-searched'); + if (hasFilter && isMatch) { + matchCount++; + } }) + + ul.classList.toggle('is-filtered', matchCount > 0); }) clearSearch.addEventListener('click', e => {