diff options
author | Deniz Akşimşek <deniz@denizaksimsek.com> | 2022-11-16 18:46:23 +0300 |
---|---|---|
committer | Deniz Akşimşek <deniz@denizaksimsek.com> | 2022-11-16 18:46:23 +0300 |
commit | 1c0d69af0cf9aa2087fe7ef7562a6b7026c49022 (patch) | |
tree | b0023162ddc2a4df880c616f6396a9309328994b | |
parent | 7769c5b6fa8d0afa61aebf7f9a7eca1a722d9004 (diff) | |
download | missing-1c0d69af0cf9aa2087fe7ef7562a6b7026c49022.tar.gz missing-1c0d69af0cf9aa2087fe7ef7562a6b7026c49022.zip |
refactor search uiv1.0.2
-rw-r--r-- | www/js/pagefind.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/www/js/pagefind.js b/www/js/pagefind.js index 6559d62..e3a9346 100644 --- a/www/js/pagefind.js +++ b/www/js/pagefind.js @@ -25,7 +25,7 @@ updateResultItem = (item, result) => { return item; }, searchDialog = () => { - const dialog = /** @type {HTMLDialogElement} */ (html` + const markup = (html` <dialog class="margin f-col" style="max-width: 100%; width: 30em; max-height: 100%; height: 40em"> <label for="search-input" class="titlebar" style="margin-inline: calc(-1*var(--gap))"> Search @@ -33,9 +33,9 @@ searchDialog = () => { <p><input autofocus id="search-input" class="block width:100%"></p> <div role="listbox" aria-label="results" class="flow-gap padding-inline" style="overflow-y: auto; margin-inline: calc(-1*var(--gap))"></div> </dialog> - `.children[0]); + `); - const input = $(dialog, "input"), results = $(dialog, "[role=listbox]"); + const dialog = $(markup, "dialog"), input = $(dialog, "input"), results = $(dialog, "[role=listbox]"); const showSearchResults = repeater(results, { |