-
Notifications
You must be signed in to change notification settings - Fork 1
/
error.vue
192 lines (164 loc) · 3.31 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<template>
<div class="error-page">
<div class="content">
<div class="hand">
<img src="/svg/hand-error.svg" alt="404" />
</div>
<div class="text">
<h1>{{ errorCode }}</h1>
<p>
Looks like you’re lost...<br />
There’s no page for <span class="uri">{{ truncatedUri }}</span>
</p>
<div class="buttons">
<NuxtLink class="btn red" to="/">Return to Home</NuxtLink>
<NuxtLink class="btn status-page" to="https://status.foxogram.su/">Status Page</NuxtLink>
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import type { NuxtError } from '#app';
import { useRoute } from 'vue-router';
const route = useRoute();
const props = defineProps({
error: {
type: Object as () => NuxtError | undefined,
required: false,
},
});
const errorCode = props.error?.statusCode || '404';
const truncatedUri = route.path.length > 30 ? route.path.substring(0, 30) + '...' : route.path;
</script>
<style scoped>
.error-page {
position: relative;
background-color: #0a0a0a;
background-image: url("/svg/grid-background.svg"), url("/svg/noiseEffect.svg");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
padding: 0 20px;
}
.content {
display: flex;
align-items: center;
justify-content: center;
gap: 200px;
margin-bottom: 155px;
position: relative;
}
.hand {
position: relative;
transform: translateY(0);
width: 150px;
height: 150px;
display: flex;
align-items: center;
justify-content: center;
}
.hand::before {
content: '';
position: absolute;
width: 300%;
height: 300%;
background: radial-gradient(circle, rgba(242, 74, 74, 0.29) 0%, rgba(242, 74, 74, 0) 70%);
border-radius: 50%;
}
.hand img {
width: 150px;
height: auto;
}
.text {
text-align: left;
max-width: 400px;
margin-left: 10px;
}
h1 {
font: 900 120px var(--font-family);
color: #f24a4a;
margin: 0 0 -19px 0;
}
p {
font: 400 23px var(--font-family);
color: #fff;
margin: 20px 0;
}
.uri {
font: 700 23px var(--font-family);
color: #f24a4a;
}
.buttons {
display: flex;
gap: 10px;
}
.btn {
font: 400 16px var(--font-family);
color: #ececec;
border-radius: 5px;
padding: 11px 18px;
height: 20px;
text-decoration: none;
background: #f24747;
transition: background 0.3s ease;
}
.btn, .status-page {
border: 1px solid rgba(96, 96, 96, 0.5);
border-radius: 5px;
padding: 11px 18px;
backdrop-filter: blur(5px);
background: rgba(0, 0, 0, 0.25);
}
.btn.red {
background: #f24a4a;
}
.btn:hover {
background: rgba(242, 74, 74, 0.75);
}
.status-page:hover {
background: rgba(200, 200, 200, 0.25);
}
@media (max-width: 768px) {
.content {
flex-direction: column;
gap: 30px;
margin-left: 0;
margin-bottom: 50px;
}
.hand {
width: 100px;
height: 100px;
}
.hand img {
width: 100px;
height: auto;
}
.text {
text-align: center;
margin-left: 0;
max-width: 90%;
}
h1 {
font-size: 80px;
}
p {
font-size: 18px;
}
.uri {
font-size: 18px;
}
.buttons {
flex-direction: column;
align-items: center;
gap: 15px;
}
.btn, .status-page {
padding: 10px 15px;
}
}
</style>