WIP: added empty search bar and search component
This commit is contained in:
28
front/src/NavBarSearch.vue
Normal file
28
front/src/NavBarSearch.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const searchterm = ref("");
|
||||
const router = useRouter();
|
||||
|
||||
function onSearchClick() {
|
||||
router.push('/search/' + searchterm.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="navbar-item">
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
<input v-model="searchterm" class="input" type="text" />
|
||||
</div>
|
||||
<div class="control">
|
||||
<button @click="onSearchClick()" class="button">
|
||||
<span class="icon icon-search" title="Search"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user