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

36 lines
482 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">
<h1 v-if="error.statusCode === 404">
Page not found
</h1>
<h1 v-else>
An error occurred
</h1>
<NuxtLink to="/">
Home page
</NuxtLink>
2016-12-24 11:34:41 +00:00
</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>