You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.5 KiB
35 lines
1.5 KiB
{% extends "main.html" %}
|
|
|
|
{% block title %} Home {% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="mx-auto px-4 mb-4">
|
|
<label for="default-search" class="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white">Search</label>
|
|
<div class="relative content-center mb-4 max-w-56">
|
|
<div class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none">
|
|
<svg class="w-4 h-4 text-gray-500 dark:text-gray-400" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
|
|
fill="none" viewBox="0 0 20 20">
|
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"/>
|
|
</svg>
|
|
</div>
|
|
<input id="default-search"
|
|
class="block w-full p-4 ps-10 text-sm bg-slate-100 text-neutral-900 dark:bg-neutral-900 dark:text-slate-100 border border-gray-300 rounded-lg focus:ring-paynes-gray focus:border-paynes-gray"
|
|
type="search" name="q"
|
|
placeholder="Search"
|
|
aria-label="Search"
|
|
value='{{ query.search.as_deref().unwrap_or("") }}'
|
|
hx-get="/home/search"
|
|
hx-trigger="search, keyup delay:500ms changed"
|
|
hx-target="#items"
|
|
hx-push-url="true"
|
|
/>
|
|
</div>
|
|
|
|
<div id="items" class="container">
|
|
{% include "home_search_item_fragment.html" %}
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %} |