mirror of
https://github.com/LukeSmithxyz/based.cooking.git
synced 2025-03-27 03:59:15 +00:00
Update content/_index.md
Co-authored-by: Steven Hall <Hallzy.18@gmail.com>
This commit is contained in:
parent
37a50abea3
commit
6fff64138e
@ -21,7 +21,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
search.addEventListener('input', e => {
|
search.addEventListener('input', e => {
|
||||||
// grab search input value
|
// grab search input value
|
||||||
const searchText = e.target.value.toLowerCase()
|
const searchText = e.target.value.toLowerCase()
|
||||||
|
|
||||||
|
const hasFilter = searchText.length > 0;
|
||||||
|
|
||||||
// for each recipe hide all but matched
|
// for each recipe hide all but matched
|
||||||
|
let matchCount = 0;
|
||||||
rec.forEach(el => {
|
rec.forEach(el => {
|
||||||
const recipeName = el.innerText.toLowerCase()
|
const recipeName = el.innerText.toLowerCase()
|
||||||
const isMatch = recipeName.includes(searchText)
|
const isMatch = recipeName.includes(searchText)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user