-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.vue
106 lines (89 loc) · 1.86 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
<template>
<NuxtLayout :name="404">
<div class="full-height">
<div class="error-container">
<img class="img-fluid" src = ./assets/404wizard.png>
<div class="text">
<h3>Technica</h3>
<h3>Evil Wizard 404</h3>
<p>You have walked into his secret lair! Click <a href="https://gotechnica.org">here</a> to teleport back to safety</p>
</div>
</div>
</div>
</NuxtLayout>
</template>
<script>
export default {
mounted() {
this.adjustImageHeight();
window.addEventListener('resize', this.adjustImageHeight);
},
methods: {
adjustImageHeight() {
const image = document.getElementById('box');
const wiz = document.getElementById('wiz');
const viewportHeight = window.innerHeight;
const width = window.innerWidth;
// Let's say we want the image to be 50% of the viewport height
image.style.height = viewportHeight * 0.03 + 'rem';
},
},
};
</script>
<style scoped lang="scss">
@import '~/assets/styles/_variables.scss';
.full-height {
height: 100%;
}
.error-container {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
}
.img-fluid {
width: 60%;
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: -2%;
}
.text {
text-align: center;
display: block;
margin-left: auto;
margin-right: auto;
width: 80%;
}
.text h3 {
font-size: 400% !important;
}
.text p {
font-size: 125% !important;
color: black;
}
@media screen and (max-width: 900px) {
.text h3 {
font-size: 300% !important;
}
.text p {
font-size: 100% !important;
}
.img-fluid {
width: 80%;
}
}
@media screen and (max-width: 450px) {
.text h3 {
font-size: 200% !important;
}
.text p {
font-size: 80% !important;
}
.text {
width: 80%;
}
}
</style>