tangled
alpha
login
or
join now
finxol.io
/
blog
0
fork
atom
Personal blog
finxol.io
blog
0
fork
atom
overview
issues
pulls
pipelines
feat: improve 404 page
finxol.io
3 months ago
d0022c86
26f1fa60
verified
This commit was signed with the committer's
known signature
.
finxol.io
SSH Key Fingerprint:
SHA256:olFE3asYdoBMScuJOt60UxXdJ0RFdGv5kVKrdOtIcPI=
1/1
deploy.yaml
success
2m 22s
+26
-5
2 changed files
expand all
collapse all
unified
split
app
pages
[...page].vue
posts
[...slug].vue
+14
-1
app/pages/[...page].vue
reviewed
···
1
1
<script setup>
2
2
+
import A from "@/components/content/ProseA.vue";
3
3
+
2
4
const route = useRoute();
3
5
const { data: page } = await useAsyncData(route.path, () =>
4
6
queryCollection("pages").path(`/pages${route.path}`).first()
···
32
34
</div>
33
35
34
36
<div v-else>
35
35
-
not found
37
37
+
<article class="grid place-items-center gap-6 mt-12">
38
38
+
<h2 class="text-3xl font-bold text-gray-900 dark:text-gray-200">It seems you might be lost...</h2>
39
39
+
<p class="text-gray-500 dark:text-gray-400">Please check the URL and try again.</p>
40
40
+
41
41
+
<div></div>
42
42
+
43
43
+
<div class="flex flex-row gap-2 items-baseline">
44
44
+
<A href="/" target="_self" class="text-lg">
45
45
+
Take me home!</A>
46
46
+
<span class="text-gray-500 dark:text-gray-400 text-sm">(country roads)</span>
47
47
+
</div>
48
48
+
</article>
36
49
</div>
37
50
</template>
+12
-4
app/pages/posts/[...slug].vue
reviewed
···
102
102
</article>
103
103
104
104
<div v-else class="flex items-center justify-center">
105
105
-
<div class="text-center">
106
106
-
<h1 class="text-4xl font-bold">404</h1>
107
107
-
<p class="text-neutral-500">Page not found</p>
108
108
-
</div>
105
105
+
<article class="grid place-items-center gap-6 mt-12">
106
106
+
<h2 class="text-3xl font-bold text-gray-900 dark:text-gray-200">It seems you might be lost...</h2>
107
107
+
<p class="text-gray-500 dark:text-gray-400">Please check the URL and try again.</p>
108
108
+
109
109
+
<div></div>
110
110
+
111
111
+
<div class="flex flex-row gap-2 items-baseline">
112
112
+
<A href="/" target="_self" class="text-lg">
113
113
+
Take me home!</A>
114
114
+
<span class="text-gray-500 dark:text-gray-400 text-sm">(country roads)</span>
115
115
+
</div>
116
116
+
</article>
109
117
</div>
110
118
</div>
111
119
</template>