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>
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1 v-if="error.statusCode === 404">Page not found</h1>
|
||||
<h1 v-else>An error occurred</h1>
|
||||
<NuxtLink to="/">Home page</NuxtLink>
|
||||
<section>
|
||||
<h2 v-if="error.statusCode === 404">Page not found</h2>
|
||||
<pre v-else style="width: 100%">{{ error }}</pre>
|
||||
</section>
|
||||
<section>
|
||||
<NuxtLink to="/">Home page</NuxtLink>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in new issue
Block a user