2016-11-07 01:34:58 +00:00
|
|
|
<template>
|
2017-08-05 10:24:12 +00:00
|
|
|
<div class="__nuxt-error-page">
|
|
|
|
<div class="container">
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="column">
|
|
|
|
<h1>{{ error.statusCode }} </h1>
|
|
|
|
<h4> {{ $route.path }} </h4>
|
2017-08-05 16:52:26 +00:00
|
|
|
<pre class="error-box"><code>{{ error.message }}<%if(isDev){%><br>{{ error.stack }}<%}%></code></pre>
|
2017-08-05 12:12:59 +00:00
|
|
|
<p v-if="error.statusCode === 404 || error.statusCode === 'Whoops!'">
|
2017-08-05 10:24:12 +00:00
|
|
|
<nuxt-link class="error-link" to="/">Back to the home page</nuxt-link>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="column">
|
|
|
|
<div class="poweredby">
|
2017-08-05 15:19:46 +00:00
|
|
|
<small> Powered by <a href="https://nuxtjs.org" target="_blank" rel="noopener">Nuxt.js</a> </small>
|
2017-08-05 10:24:12 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-11-07 01:34:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2016-11-21 13:14:35 +00:00
|
|
|
name: 'nuxt-error',
|
2016-11-19 21:48:06 +00:00
|
|
|
props: ['error'],
|
|
|
|
head () {
|
|
|
|
return {
|
2017-08-05 10:24:12 +00:00
|
|
|
title: this.error ? ((this.error.statusCode || 500) + ' - ' + (this.error.message || 'Error')) : '500 - Error',
|
|
|
|
link: [
|
|
|
|
{ rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css', type: 'text/css', media: 'all' },
|
|
|
|
{ rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.min.css', type: 'text/css', media: 'all' }
|
|
|
|
]
|
2016-11-19 21:48:06 +00:00
|
|
|
}
|
|
|
|
}
|
2016-11-07 01:34:58 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2017-08-05 10:24:12 +00:00
|
|
|
<style>
|
|
|
|
.__nuxt-error-page {
|
2017-08-05 15:19:46 +00:00
|
|
|
background: #F5F7FA;
|
2017-08-05 11:03:56 +00:00
|
|
|
font-size: 14px;
|
2017-08-05 10:24:12 +00:00
|
|
|
word-spacing: 1px;
|
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
-webkit-font-smoothing: antialiased;
|
2016-11-07 01:34:58 +00:00
|
|
|
}
|
2017-08-05 10:24:12 +00:00
|
|
|
.__nuxt-error-page .container {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
flex-direction: column;
|
|
|
|
height: 100vh;
|
2017-08-05 11:03:56 +00:00
|
|
|
margin: 0 auto;
|
|
|
|
max-width: 70%;
|
2016-11-07 01:34:58 +00:00
|
|
|
}
|
2017-08-05 10:24:12 +00:00
|
|
|
.__nuxt-error-page .error-box {
|
|
|
|
box-shadow: 0px 0px 9px #d3d3d3;
|
|
|
|
padding: 10px;
|
2016-11-07 01:34:58 +00:00
|
|
|
}
|
2017-08-05 10:24:12 +00:00
|
|
|
.__nuxt-error-page .poweredby {
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 10%;
|
2016-11-07 01:34:58 +00:00
|
|
|
}
|
2017-08-05 15:19:46 +00:00
|
|
|
a {
|
|
|
|
color: #42b983;
|
|
|
|
}
|
|
|
|
pre {
|
|
|
|
border-color: #42b983;
|
|
|
|
}
|
2016-11-07 01:34:58 +00:00
|
|
|
</style>
|