|
|
@ -16,7 +16,16 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col md:flex-row items-stretch md:items-center md:space-x-3 space-y-3 md:space-y-0 justify-between mx-4 py-4 border-t dark:border-gray-700">
|
|
|
|
<div class="flex flex-col md:flex-row items-stretch md:items-center md:space-x-3 space-y-3 md:space-y-0 justify-between mx-4 py-4 border-t dark:border-gray-700">
|
|
|
|
<div class="w-full md:w-1/2">
|
|
|
|
<div class="w-full md:w-1/2"
|
|
|
|
|
|
|
|
x-data="{
|
|
|
|
|
|
|
|
search: new URLSearchParams(location.search).get('search')
|
|
|
|
|
|
|
|
}"
|
|
|
|
|
|
|
|
x-init="$watch('search', (value) => {
|
|
|
|
|
|
|
|
const url = new URL(window.location.href);
|
|
|
|
|
|
|
|
url.searchParams.set('search', value);
|
|
|
|
|
|
|
|
history.replaceState(null, null, '?'+url.searchParams.toString());
|
|
|
|
|
|
|
|
})"
|
|
|
|
|
|
|
|
>
|
|
|
|
<div class="flex items-center">
|
|
|
|
<div class="flex items-center">
|
|
|
|
<div class="relative w-full">
|
|
|
|
<div class="relative w-full">
|
|
|
|
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
|
|
|
|
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
|
|
|
@ -27,6 +36,7 @@
|
|
|
|
<input type="text"
|
|
|
|
<input type="text"
|
|
|
|
id="search"
|
|
|
|
id="search"
|
|
|
|
name="search"
|
|
|
|
name="search"
|
|
|
|
|
|
|
|
x-model="search"
|
|
|
|
hx-post="/htmx/admin/search/articles/"
|
|
|
|
hx-post="/htmx/admin/search/articles/"
|
|
|
|
hx-trigger="input changed delay:500ms, search"
|
|
|
|
hx-trigger="input changed delay:500ms, search"
|
|
|
|
hx-target="#articles"
|
|
|
|
hx-target="#articles"
|
|
|
@ -174,5 +184,4 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
|
|
{{> search_articles_update_param_script }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|