Skip to content

Instantly share code, notes, and snippets.

@owenconti
Created May 23, 2020 04:37
Show Gist options
  • Save owenconti/cb51f596a6c36233d659fbadcc061dca to your computer and use it in GitHub Desktop.
Save owenconti/cb51f596a6c36233d659fbadcc061dca to your computer and use it in GitHub Desktop.
Oh See Gists Demo
<div class="relative w-64" x-data="initSearch()">
<input
type="search"
x-model="query"
x-on:keyup="search()"
class="bg-white border border-gray-300 p-1 rounded w-full"
placeholder="Search..."
/>
<div x-show="query" class="absolute bg-white shadow rounded w-full max-w-full" style="display: none;">
<p x-show="loading" class="py-2 m-0">Loading</p>
<p x-show="!loading && !resultsHtml" class="py-2 m-0">No results.</p>
<div x-show="!loading && resultsHtml" x-html="resultsHtml"></div>
</div>
</div>
import Alpine from 'alpinejs';
import debounce from './debounce';
<?php
Route::statamic('/', 'home', [
'title' => 'Home'
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment