mirror of
https://github.com/JonasunderscoreJones/blog.jonasjones.dev.git
synced 2025-10-23 06:59:19 +02:00
added search bar
This commit is contained in:
parent
a12ac092ae
commit
00f8b2b90a
3 changed files with 27 additions and 19 deletions
|
@ -21,14 +21,22 @@
|
|||
window.addEventListener('scroll', handleScroll);
|
||||
return () => window.removeEventListener('scroll', handleScroll);
|
||||
});
|
||||
|
||||
let searchValue = '';
|
||||
|
||||
function handleSearch(event) {
|
||||
// Update the searchValue with the value received from the child component
|
||||
searchValue = event.detail;
|
||||
}
|
||||
</script>
|
||||
|
||||
<Title visible={showTitle} />
|
||||
<Navbar />
|
||||
<Navbar on:search={handleSearch} />
|
||||
|
||||
<main>
|
||||
<div class="content">
|
||||
<Router {routes} />
|
||||
<p>Search Value: {searchValue}</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue