-
Notifications
You must be signed in to change notification settings - Fork 2
/
error.vue
122 lines (105 loc) · 2.59 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
<template>
<NuxtLayout name="root">
<main class="main-content-wrapper">
<h1 class="error-heading">
{{ errorHeadingText }}
</h1>
<img
src="~~/assets/images/not-found.svg"
alt="Pages, documents contain question marks"
class="error-illustration"
/>
<div class="links">
<NuxtLink to="/soundcloud/download" class="page-link">
<EmeraldFilledButton size="large">
<img
src="~~/assets/images/download.svg"
alt="Download icon"
/>
SoundCloud
</EmeraldFilledButton>
</NuxtLink>
<NuxtLink to="/youtube/download" class="page-link">
<EmeraldFilledButton size="large">
<img
src="~~/assets/images/download.svg"
alt="Download icon"
/>
YouTube
</EmeraldFilledButton>
</NuxtLink>
</div>
</main>
</NuxtLayout>
</template>
<script lang="ts" setup>
const props = defineProps({
error: {
type: Object,
required: true,
},
})
const errorHeadingText =
props.error.statusCode == 404 ? 'Page not found' : 'Something went wrong'
useHead({
title: `${errorHeadingText} | Saveable`,
})
</script>
<style lang="scss" scoped>
.main-content-wrapper {
flex-grow: 1;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
row-gap: 60px;
}
.error-heading {
text-align: center;
font-weight: bold;
font-size: 3.2rem;
color: black;
@extend %themeable;
.dark & {
color: white;
}
}
.error-illustration {
width: 25%;
min-width: 300px;
}
.links {
display: flex;
justify-content: center;
align-items: center;
column-gap: 25px;
flex-wrap: wrap;
row-gap: 20px;
}
@media (max-width: 785px) {
.error-heading {
font-size: 2.3rem;
}
.main-content-wrapper {
padding-bottom: 160px;
}
}
@media (max-width: 500px) {
.page-link,
.page-link button {
width: 100%;
}
}
@media (max-width: 400px) {
.main-content-wrapper {
padding-left: 15px;
padding-right: 15px;
padding-top: 30px;
justify-content: start;
}
.error-illustration {
min-width: 200px;
}
}
</style>