mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
Reconfigured the global search to include more than one model. Refactored the search front-end to work inline instead of inside a model/popup.
24 lines
1.6 KiB
PHP
24 lines
1.6 KiB
PHP
<div class="flex flex-1 justify-center px-2 lg:ml-6 lg:justify-end">
|
|
<div class="w-full max-w-lg lg:max-w-md">
|
|
<label for="search" class="sr-only">{{ __('Search') }}</label>
|
|
<search class="relative group" role="search">
|
|
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
|
|
<svg class="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path fill-rule="evenodd" d="M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z" clip-rule="evenodd" />
|
|
</svg>
|
|
</div>
|
|
<input id="global-search"
|
|
type="search"
|
|
wire:model.live="query"
|
|
@keydown.escape.window="$wire.clearSearch()"
|
|
placeholder="{{ __('Search') }}"
|
|
aria-controls="search-results"
|
|
aria-expanded="{{ $showDropdown ? 'true' : 'false' }}"
|
|
aria-label="{{ __('Search') }}"
|
|
class="block w-full rounded-md border-0 bg-white dark:bg-gray-700 py-1.5 pl-10 pr-3 text-gray-900 dark:text-gray-300 ring-1 ring-inset ring-gray-300 dark:ring-gray-700 placeholder:text-gray-400 dark:placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-gray-600 dark:focus:bg-gray-200 dark:focus:text-black dark:focus:ring-0 sm:text-sm sm:leading-6"
|
|
/>
|
|
<x-global-search-results :showDropdown="$showDropdown" :noResults="$noResults" :results="$results" />
|
|
</search>
|
|
</div>
|
|
</div>
|