Highlight the searched terms in the thread page
This commit is contained in:
parent
d61ec05963
commit
c9227ee8fb
7 changed files with 92 additions and 4 deletions
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
function select(r: SearchResult) {
|
||||
open = false;
|
||||
goto(`/thread/${r.threadId}`);
|
||||
goto(search.threadUrl(r.threadId));
|
||||
}
|
||||
|
||||
function onKeydown(e: KeyboardEvent) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue