@@ -65,6 +65,11 @@ const collectionLd = {
6565 <cite >— ICP Skills protocol, <a href =" /llms.txt" ><code >/llms.txt</code ></a ></cite >
6666 </blockquote >
6767
68+ <div class =" search-bar" >
69+ <svg width =" 16" height =" 16" viewBox =" 0 0 24 24" fill =" none" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ><circle cx =" 11" cy =" 11" r =" 8" /><line x1 =" 21" y1 =" 21" x2 =" 16.65" y2 =" 16.65" /></svg >
70+ <input id =" skill-search" type =" text" placeholder =" Filter skills…" autocomplete =" off" />
71+ </div >
72+
6873 { grouped .map (({ category , skills }) => (
6974 <section class = " category" id = { ` category-${encodeURIComponent (category )} ` } aria-labelledby = { ` cat-h-${category } ` } >
7075 <div class = " cat-head" >
@@ -105,3 +110,27 @@ const collectionLd = {
105110 });
106111 })();
107112</script >
113+
114+ <script is:inline >
115+ (function () {
116+ var input = document.getElementById('skill-search');
117+ if (!input) return;
118+ input.addEventListener('input', function () {
119+ var q = input.value.toLowerCase().trim();
120+ var sections = document.querySelectorAll('section.category');
121+ sections.forEach(function (section) {
122+ var rows = section.querySelectorAll('.skill-row');
123+ var visible = 0;
124+ rows.forEach(function (row) {
125+ var title = row.querySelector('.skill-title');
126+ var desc = row.querySelector('.skill-desc');
127+ var text = ((title ? title.textContent : '') + ' ' + (desc ? desc.textContent : '')).toLowerCase();
128+ var match = !q || text.indexOf(q) !== -1;
129+ row.style.display = match ? '' : 'none';
130+ if (match) visible++;
131+ });
132+ section.style.display = visible ? '' : 'none';
133+ });
134+ });
135+ })();
136+ </script >
0 commit comments