2023-04-16 15:48:20 -04:00
|
|
|
<script lang="ts">
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
return {
|
2023-07-20 13:57:01 -04:00
|
|
|
searchInput: ''
|
2023-04-16 15:48:20 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
redirectToSearch() {
|
|
|
|
const query = this.searchInput
|
2023-07-20 13:57:01 -04:00
|
|
|
this.$router.push({ path: '/search/', query: { query } })
|
2023-04-16 15:48:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2023-04-16 12:37:23 -04:00
|
|
|
<template>
|
2023-07-20 13:57:01 -04:00
|
|
|
<div class="relative hidden md:block">
|
|
|
|
<label for="searchBar" class="hidden">{{ $t('main.search') }}</label>
|
|
|
|
<v-icon name="io-search-outline" class="absolute my-auto inset-y-0 left-2"></v-icon>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
id="searchBar"
|
|
|
|
name="searchBar"
|
|
|
|
:placeholder="$t('main.search')"
|
|
|
|
v-model="searchInput"
|
|
|
|
@keyup.enter="redirectToSearch"
|
|
|
|
class="rounded-md p-1 pl-8 text-black bg-white placeholder:text-black"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|