feat: add 404 page

This commit is contained in:
João Peixoto
2021-01-21 19:39:13 +00:00
committed by João Peixoto
parent eaba221db3
commit 45da7f0625
5 changed files with 23 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
<template>
<footer class="footer bg-gradient-6 text-white py-8 md:py-16">
<footer class="footer bg-gradient-6 text-white py-8 md:py-16 mt-auto">
<div class="grid grid-cols-12 grid-margins">
<NewsletterForm class="col-start-1 col-span-12 lg:pb-20" />
<div class="col-start-0 md:col-start-1 col-span-12 md:col-span-12">

View File

@@ -10,9 +10,7 @@
@leave="leave"
@after-leave="afterLeave"
>
<main :key="withKey">
<slot></slot>
</main>
<slot></slot>
</transition>
</template>
@@ -36,10 +34,6 @@ export default {
type: Boolean,
default: false,
},
withKey: {
type: String,
default: null,
},
beforeEnter: Func,
enter: Func,
afterEnter: Func,

View File

@@ -1,10 +1,14 @@
<template>
<Layout>
<div>
<div>
<h1>404</h1>
<blockquote>Nothing to see here.</blockquote>
<RouterLink to="/">Take me home.</RouterLink>
<Layout class="flex flex-col flex-grow">
<div class="bg-gradient-6 h-20"></div>
<div class="bg-gray-light flex flex-grow">
<div class="grid-margins w-full type-rich py-8">
<h1>Item not found</h1>
<hr class="border separator" />
<div>
This item has been moved or removed.
<RouterLink to="/">Back to home</RouterLink>
</div>
</div>
</div>
</Layout>
@@ -20,3 +24,9 @@ export default {
},
}
</script>
<style scoped lang="postcss">
.separator {
border-color: #e9e9ec;
}
</style>

View File

@@ -1,12 +1,12 @@
<template>
<main>
<div class="flex flex-col min-h-screen">
<Nav v-if="shouldDisplay('nav')" ref="nav" />
<MobileNav v-if="shouldDisplay('nav')" />
<Transition :with-key="$page.key" appear :after-leave="leaveScroll">
<Transition appear :after-leave="leaveScroll">
<component :is="layout" />
</Transition>
<Footer v-if="shouldDisplay('footer')" />
</main>
</div>
</template>
<script>

View File

@@ -1,5 +1,5 @@
<template>
<div>
<main>
<slot name="header"></slot>
<DynamicContent
v-if="$page.frontmatter.body"
@@ -7,7 +7,7 @@
/>
<slot></slot>
<slot name="footer"></slot>
</div>
</main>
</template>
<script>