Homepage: Difference between revisions
No edit summary |
No edit summary |
||
| Line 808: | Line 808: | ||
<div style="display:flex;align-items:center;gap:8px"> | <div style="display:flex;align-items:center;gap:8px"> | ||
<div style="position:relative"> | <div style="position:relative"> | ||
<input id="latest-search-input" type="text" placeholder="Search latest… | <input id="latest-search-input" type="text" placeholder="Search latest…" style="background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:9px 14px 9px 36px;color:var(--text);font-size:.88rem;width:200px;outline:none" /> | ||
<svg style="position:absolute;left:10px;top:50%;transform:translateY(-50%);pointer-events:none;opacity:.5" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-4.35-4.35"/></svg> | <svg style="position:absolute;left:10px;top:50%;transform:translateY(-50%);pointer-events:none;opacity:.5" width="16" height="16" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-4.35-4.35"/></svg> | ||
</div> | </div> | ||
| Line 1,309: | Line 1,309: | ||
card.style.display = (!q || text.includes(q)) ? '' : 'none'; | card.style.display = (!q || text.includes(q)) ? '' : 'none'; | ||
}); | }); | ||
// Attach search to latest input | |||
document.addEventListener('DOMContentLoaded', function() { | |||
var inp = document.getElementById('latest-search-input'); | |||
if (inp) inp.addEventListener('input', function() { filterLatestCards(this.value); }); | |||
}); | |||
}); | }); | ||
} | } | ||