Skip to content

Commit 002be07

Browse files
committed
Feat: implemented Error page
1 parent e6c1902 commit 002be07

File tree

2 files changed

+60
-6
lines changed

2 files changed

+60
-6
lines changed

components/PageFooter.vue

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<footer id="footer" class="grid">
33
<div class="col">
4-
<div class="footer-content">
4+
<div :class="['footer-content', recentPosts.length > 0 ? '' : 'no-recent-posts']">
55

66
<div class="footer-panel left-panel">
77
<nuxt-link
@@ -20,7 +20,7 @@
2020
</a>
2121
</div>
2222

23-
<div class="footer-panel right-panel">
23+
<div v-if="recentPosts.length > 0" class="footer-panel right-panel">
2424
<h3 class="top-heading">
2525
Recent Posts
2626
</h3>
@@ -51,7 +51,8 @@ export default {
5151
props: {
5252
recentPosts: {
5353
type: Array,
54-
required: true
54+
default: () => [],
55+
required: false
5556
}
5657
},
5758
@@ -88,6 +89,20 @@ export default {
8889
left: 0;
8990
background-color: black;
9091
}
92+
&.no-recent-posts {
93+
justify-content: space-between;
94+
.middle-panel {
95+
align-items: flex-end;
96+
@include small {
97+
align-items: center;
98+
margin-top: 2rem;
99+
margin-bottom: 1rem;
100+
}
101+
.social-icons {
102+
display: none;
103+
}
104+
}
105+
}
91106
}
92107
93108
.footer-panel {

layouts/error.vue

+42-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,47 @@
11
<template>
2-
<div class="error-page">
3-
ERROR
2+
<div class="container page-error">
3+
4+
<div class="top-panel">
5+
<div class="grid">
6+
<div class="col">
7+
<Header />
8+
</div>
9+
</div>
10+
</div>
11+
12+
<div class="grid">
13+
<div class="col-6_sm-12">
14+
<h3>Hmm, either something went wrong with the site or we can't find what you're looking for. Try again in a bit or click a link below!</h3>
15+
</div>
16+
</div>
17+
18+
<PageFooter />
19+
420
</div>
521
</template>
622

7-
<style>
23+
<script>
24+
import Header from '@/components/Header'
25+
import PageFooter from '@/components/PageFooter'
26+
27+
export default {
28+
components: {
29+
Header,
30+
PageFooter
31+
}
32+
}
33+
</script>
34+
35+
<style lang="scss" scoped>
36+
.top-panel {
37+
display: flex;
38+
flex-direction: column;
39+
justify-content: flex-end;
40+
height: 38.2vh;
41+
margin-bottom: 2rem;
42+
position: relative;
43+
@include small {
44+
height: 61.8vh;
45+
}
46+
}
847
</style>

0 commit comments

Comments
 (0)