Highlight the searched terms in the thread page

This commit is contained in:
dtonon 2026-08-12 11:33:00 +01:00
parent d61ec05963
commit c9227ee8fb
7 changed files with 92 additions and 4 deletions

View file

@ -15,7 +15,7 @@
function select(r: SearchResult) {
open = false;
goto(`/thread/${r.threadId}`);
goto(search.threadUrl(r.threadId));
}
function onKeydown(e: KeyboardEvent) {

View file

@ -21,7 +21,7 @@
function select(r: SearchResult) {
closeSearch();
goto(`/thread/${r.threadId}`);
goto(search.threadUrl(r.threadId));
}
// Global "/" opens the search from any page, unless typing somewhere else

View file

@ -41,7 +41,7 @@
{#each search.results as r, i (r.threadId)}
<a
id="{idBase}-{i}"
href="/thread/{r.threadId}"
href={search.threadUrl(r.threadId)}
role="option"
aria-selected={i === search.activeIndex}
class="block rounded px-4 py-2 {i === search.activeIndex