-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance: update landing page (#1976)
Update +page.svelte prettier mork_borg.jpeg Update +page.svelte Update +page.svelte Update app.css placeholder
- Loading branch information
1 parent
f7af180
commit 2aea656
Showing
8 changed files
with
219 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<script lang="ts"> | ||
import { SearchIcon } from 'lucide-svelte'; | ||
import { twMerge } from 'tailwind-merge'; | ||
interface Props { | ||
onChange: (value: string) => void; | ||
class?: string; | ||
} | ||
let { onChange, class: klass }: Props = $props(); | ||
let searchTimeout: ReturnType<typeof setTimeout>; | ||
function search(e: Event) { | ||
const value = (e.target as HTMLInputElement).value; | ||
// Clear previous timeout | ||
if (searchTimeout) clearTimeout(searchTimeout); | ||
// Set new timeout for debounced search | ||
searchTimeout = setTimeout(() => { | ||
onChange(value); | ||
}, 300); | ||
} | ||
</script> | ||
|
||
<div class="relative mb-8 w-full"> | ||
<input | ||
type="text" | ||
placeholder="Search Obots..." | ||
class={twMerge( | ||
'peer w-full rounded-xl border-none bg-surface1 px-2.5 py-4 pl-12 ring-2 ring-transparent transition-all duration-200 hover:ring-2 hover:ring-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500', | ||
klass | ||
)} | ||
oninput={search} | ||
/> | ||
<SearchIcon class="absolute left-4 top-1/2 -translate-y-1/2 text-gray peer-focus:text-blue-500" /> | ||
</div> |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.