website now works
This commit is contained in:
1 parent
ce56fcb91c
commit
3daa9f82e7
15 files changed
+241
-137
No files matched your search
@@ -14,11 +14,7 @@
|
||||
</ul>
|
||||
|
||||
<form @submit.prevent="doSearch">
|
||||
<input
|
||||
type="search"
|
||||
:value="$route.query.q"
|
||||
placeholder="Search..."
|
||||
/>
|
||||
<input v-model="q" type="search" placeholder="Search..." />
|
||||
<div class="icon">🔎</div>
|
||||
</form>
|
||||
</nav>
|
||||
@@ -34,9 +30,20 @@ import { THEME } from '~/assets/global'
|
||||
@Component
|
||||
export default class DefaultLayout extends Vue {
|
||||
theme = THEME
|
||||
q = this.$route.query.q || ''
|
||||
|
||||
doSearch() {
|
||||
alert('not implemented')
|
||||
let path = this.$route.path
|
||||
if (['/blog', '/tag'].includes(path)) {
|
||||
path = '/blog'
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
path,
|
||||
query: {
|
||||
q: this.q,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user