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>
|
2025-01-21 11:06:01 +03:00
|
|
|
<div class="relative md:block outline-none">
|
2023-07-20 13:57:01 -04:00
|
|
|
<label for="searchBar" class="hidden">{{ $t('main.search') }}</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
id="searchBar"
|
|
|
|
name="searchBar"
|
|
|
|
:placeholder="$t('main.search')"
|
|
|
|
v-model="searchInput"
|
|
|
|
@keyup.enter="redirectToSearch"
|
2025-01-21 12:14:08 +03:00
|
|
|
class="rounded-md text-white bg-none placeholder:text-black w-full outline-none"
|
|
|
|
style="border-bottom: solid 1px white"
|
2023-07-20 13:57:01 -04:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|