-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.vue
More file actions
107 lines (97 loc) · 2.01 KB
/
error.vue
File metadata and controls
107 lines (97 loc) · 2.01 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<template>
<div>
<NuxtLayout>
<div class="error-page">
<h1 class="page-title">
{{ error?.statusCode }}
</h1>
<div class="page-content">
<img
src="/img/search.png"
alt="Page not found"
width="300"
height="230"
>
<div
v-if="error?.statusCode == 404"
class="error-content"
>
<h1 class="page-title">
Page not found
</h1>
<div class="error-message">
<p> We're sorry, the page you requested could not be found </p>
<p> Please go back to the dashboard </p>
</div>
<button
class="button"
@click="handleError"
>
Go to dashboard
</button>
</div>
</div>
</div>
</NuxtLayout>
</div>
</template>
<script setup lang="ts">
import type { NuxtError } from '#app'
defineProps({
error: Object as () => NuxtError,
})
const handleError = () => clearError({ redirect: '/' })
</script>
<style scoped>
.error-page {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.page-title {
font-family: "Archivo";
font-size: 32px;
font-weight: 600;
margin: 0;
padding: 0;
}
.page-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: auto;
width: 100%;
}
.error-content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: auto;
width: 100%;
gap: 20px;
padding-top: 50px;
}
.error-message {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #A3AEB3;
}
.button {
background-color: #FF9101;
border: 0px;
padding: 10px 16px;
border-radius: 4px;
color: white;
font-size: 16px;
font-weight: 500;
cursor: pointer;
}
.button:hover {
box-shadow: 0px 0px 0px 2px rgba(255, 145, 1, 0.5);
}
</style>