Skip to content

Commit a3ff4ac

Browse files
committed
✨ feat: Add not-found page
Signed-off-by: sqrtthree <[email protected]>
1 parent acbf44a commit a3ff4ac

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

NotFound.vue

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<template>
2+
<div class="container notfound-page">
3+
<div class="content">
4+
<h1>Not Found</h1>
5+
<p>{{ getMsg() }}</p>
6+
<router-link to="/">Take me home.</router-link>
7+
</div>
8+
</div>
9+
</template>
10+
11+
<script>
12+
const msgs = [
13+
`There's nothing here.`,
14+
`How did we get here?`,
15+
`That's a Four-Oh-Four.`,
16+
`Looks like we've got some broken links.`,
17+
`Please try your request again or contact support.`,
18+
]
19+
20+
export default {
21+
methods: {
22+
getMsg() {
23+
return msgs[Math.floor(Math.random() * msgs.length)]
24+
},
25+
},
26+
}
27+
</script>
28+
29+
<style lang="stylus" scoped>
30+
.notfound-page
31+
display: flex
32+
align-items: center
33+
justify-content: center
34+
height: 100vh
35+
text-align: center
36+
37+
.content
38+
display: flex
39+
align-items: center
40+
margin-bottom: 24px
41+
42+
h1
43+
margin-bottom: 0
44+
font-size: 20px
45+
font-weight: 500
46+
47+
&::after
48+
margin: 0 10px
49+
content: "·"
50+
51+
p
52+
margin: 0
53+
margin-right: 10px;
54+
font-size: 14px
55+
</style>

0 commit comments

Comments
 (0)