Nuxt/examples/custom-layouts/layouts/error.vue

30 lines
448 B
Vue
Raw Normal View History

2016-12-24 00:55:46 +00:00
<template>
2016-12-24 11:34:41 +00:00
<div class="container">
2016-12-25 21:55:00 +00:00
<h1 v-if="error.statusCode === 404">Page not found</h1>
<h1 v-else>An error occurred</h1>
2016-12-24 11:34:41 +00:00
<nuxt-link to="/">Home page</nuxt-link>
</div>
2016-12-24 00:55:46 +00:00
</template>
<script>
export default {
props: {
error: {
type: Object,
default: null
}
}
2016-12-24 00:55:46 +00:00
}
</script>
2016-12-24 11:34:41 +00:00
<style scoped>
.container {
font-family: sans-serif;
padding-top: 10%;
text-align: center;
}
h1 {
font-size: 20px;
}
</style>