Create seperate search bar
This commit is contained in:
parent
9e8b6031f6
commit
03dab22bb9
@ -1,5 +1,10 @@
|
||||
<script lang="ts">
|
||||
export default {}
|
||||
import SearchBar from './SearchBar.vue'
|
||||
export default {
|
||||
components: {
|
||||
SearchBar
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -9,20 +14,7 @@ export default {}
|
||||
</router-link>
|
||||
|
||||
<div>
|
||||
<form class="relative hidden md:block">
|
||||
<label for="searchBar" class="hidden">Search</label>
|
||||
<v-icon
|
||||
name="io-search-outline"
|
||||
class="text-black absolute my-auto inset-y-0 left-2"
|
||||
></v-icon>
|
||||
<input
|
||||
type="text"
|
||||
id="searchBar"
|
||||
name="searchBar"
|
||||
placeholder="Search"
|
||||
class="rounded-md p-1 pl-8 text-black"
|
||||
/>
|
||||
</form>
|
||||
<search-bar></search-bar>
|
||||
</div>
|
||||
|
||||
<ul class="inline-flex space-x-6 font-medium">
|
||||
|
9
src/components/SearchBar.vue
Normal file
9
src/components/SearchBar.vue
Normal file
@ -0,0 +1,9 @@
|
||||
<template>
|
||||
<div class="relative hidden md:block">
|
||||
<label for="searchBar" class="hidden">Search</label>
|
||||
<v-icon name="io-search-outline" class="text-black absolute my-auto inset-y-0 left-2"></v-icon>
|
||||
<input type="text" placeholder="Search"
|
||||
@keyup.enter="this.$router.push('/search?query=' + this.$refs.searchInput.value)"
|
||||
class="rounded-md p-1 pl-8 text-black" ref="searchInput" />
|
||||
</div>
|
||||
</template>
|
Loading…
x
Reference in New Issue
Block a user