-
Notifications
You must be signed in to change notification settings - Fork 2
/
error.vue
107 lines (98 loc) · 2.34 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
<script setup lang="ts">
import { RichText, DividerWayFinder } from 'ucla-library-website-components'
import type { NuxtError } from '#app'
const props = defineProps({
error: Object as () => NuxtError
})
const isDevelopment = computed(() => process.env.NODE_ENV === 'development')
</script>
<template>
<NuxtLayout :is-error="true">
<main
id="main"
class="page page-error"
>
<p class="error">
{{ error?.statusCode }}
</p>
<pre v-if="isDevelopment">
{{ error?.message }}
<br>
{{ error }}
</pre>
<DividerWayFinder />
<RichText
class="
error-text"
>
<h1
v-if="error?.statusCode === 404"
class="error-title"
>
Page not found
</h1>
<h1
v-else
class="error-title"
>
An error occurred
</h1>
<p>
We can’t find the page you are looking for, but we're here to
help. <nuxt-link to="/">
Go back to home page
</nuxt-link> or
try these regularly visited links:
</p>
<ul>
<li>
<a href="https://library.ucla.edu/">UCLA Library Home</a>
</li>
<li>
<a href="https://library.ucla.edu/help/research-help/">Research Help</a>
</li>
<li>
<a href="https://library.ucla.edu/help/services-resources/accessibility-resources/">Accessibility
Resources</a>
</li>
</ul>
</RichText>
</main>
</NuxtLayout>
</template>
<style lang="scss" scoped>
.page-error {
padding: var(--space-3xl) var(--unit-gutter);
.error {
font-family: var(--font-secondary);
font-size: 248px;
font-weight: 600;
line-height: 1;
background: linear-gradient(20deg,
#fd9be0 10.99%,
#e29aee 23.02%,
#c099ff 32.91%,
#8ba0ef 42.44%,
#0aa5ff 56.68%,
#06bef2 73.09%,
#00e0e0 89.01%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-fill-color: transparent;
text-align: center;
}
.error-title {
@include step-5;
margin-bottom: 32px;
p {
margin-bottom: var(--space-xl);
}
}
@media #{$small} {
.error {
font-size: 128px;
}
}
}
</style>