-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.vue
84 lines (72 loc) · 1.45 KB
/
error.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<template>
<NuxtLayout>
<div class="main">
<div class="page-error" :class="{
'not-found': error.statusCode === 404,
}">
<Logo404 v-if="error.statusCode === 404" />
<div>
<h1 v-if="error.statusCode !== 404">An error occurred!</h1>
<p>{{ error.message }}</p>
<div class="input-group">
<nuxt-link to="/" class="btn btn-primary"> Go home </nuxt-link>
<a href="https://rsfl.team/discord" class="btn raised" rel="noopener">
Get help on Discord
</a>
</div>
</div>
</div>
</div>
</NuxtLayout>
</template>
<script setup>
import Logo404 from '~/assets/images/404.svg'
defineProps({
error: {
type: Object,
default() {
return {
statusCode: 1000,
message: 'Unknown error',
}
},
},
})
</script>
<style lang="scss" scoped>
.main {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.page-error {
width: 60%;
h1 {
margin-bottom: 0.25rem;
}
svg {
fill: var(--color-base);
color: var(--color-base);
width: 100%;
height: auto;
aspect-ratio: 1/1;
}
> div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 1rem;
}
.input-group {
display: flex;
gap: 1rem;
}
}
.not-found {
display: grid;
grid-template-columns: 1fr 1fr;
}
</style>