Created
May 23, 2020 04:37
-
-
Save owenconti/cb51f596a6c36233d659fbadcc061dca to your computer and use it in GitHub Desktop.
Oh See Gists Demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Alpine from 'alpinejs'; | |
import debounce from './debounce'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::statamic('/', 'home', [ | |
'title' => 'Home' | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment