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

31 lines
508 B
Vue
Raw Normal View History

2017-03-17 17:03:12 +00:00
<template>
<div class="container">
<h1 v-if="error.statusCode === 404">Page not found</h1>
<h1 v-else>An error occured</h1>
<nuxt-link to="/">Home page</nuxt-link>
</div>
</template>
<script>
export default {
layout: ({ isMobile }) => isMobile ? 'mobile' : 'default',
props: {
error: {
type: Object,
default: null
}
}
2017-03-17 17:03:12 +00:00
}
</script>
<style scoped>
.container {
font-family: sans-serif;
padding-top: 10%;
text-align: center;
}
h1 {
font-size: 20px;
}
</style>