autofocus search

This commit is contained in:
Julian Brammer 2024-08-29 19:28:06 +02:00
parent 5dbd5fbcdf
commit 301a0e8fdf
2 changed files with 3 additions and 1 deletions

View File

@ -191,7 +191,7 @@ h2 {
/* Search Input Field Styles */
.fuzzysearch {
margin: 0 auto;
margin: 10px auto;
text-align: center;
max-width: var(--page-max-width);
}

View File

@ -11,6 +11,8 @@ function applyFuzzySearch(linksData) {
return;
}
searchInput.scrollIntoView({ behavior: 'auto', block: 'start' });
const allLinks = linksData.links;
const scores = allLinks.map(link => ({
link: link,