Skip to content

Latest commit

 

History

History
40 lines (36 loc) · 1.19 KB

library.md

File metadata and controls

40 lines (36 loc) · 1.19 KB
layout title permalink
default
Library
/library/

Library

Search:

    {% for post in site.categories.posts %}
  • {{ post.title }}

    {{ post.description }}

    {{ post.excerpt }}

    Read more
  • {% endfor %}
<script> function filterPosts() { const searchInput = document.getElementById('search').value.toLowerCase(); const posts = document.querySelectorAll('.post'); posts.forEach(post => { const title = post.querySelector('h2').textContent.toLowerCase(); const description = post.querySelector('p:nth-of-type(1)').textContent.toLowerCase(); const excerpt = post.querySelector('p:nth-of-type(2)').textContent.toLowerCase(); if (title.includes(searchInput) || description.includes(searchInput) || excerpt.includes(searchInput)) { post.style.display = 'block'; } else { post.style.display = 'none'; } }); } </script>