2016-11-07 01:34:58 +00:00
|
|
|
<template>
|
2018-10-24 13:46:06 +00:00
|
|
|
<div class="__nuxt-error-page">
|
|
|
|
<div class="error">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="90" height="90" fill="#DBE1EC" viewBox="0 0 48 48"><path d="M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z" /></svg>
|
2017-08-05 10:24:12 +00:00
|
|
|
|
2018-10-24 13:46:06 +00:00
|
|
|
<div class="title">{{ message }}</div>
|
|
|
|
<p v-if="statusCode === 404" class="description">
|
2018-11-24 18:49:19 +00:00
|
|
|
<NuxtLink class="error-link" to="/"><%= messages.back_to_home %></NuxtLink>
|
2018-10-24 13:46:06 +00:00
|
|
|
</p>
|
|
|
|
<% if(debug) { %>
|
|
|
|
<p class="description" v-else><%= messages.client_error_details %></p>
|
|
|
|
<% } %>
|
2017-08-05 10:24:12 +00:00
|
|
|
|
2018-10-24 13:46:06 +00:00
|
|
|
<div class="logo">
|
|
|
|
<a href="https://nuxtjs.org" target="_blank" rel="noopener"><%= messages.nuxtjs %></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-11-07 01:34:58 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-11-24 18:49:19 +00:00
|
|
|
name: 'NuxtError',
|
2018-10-24 13:46:06 +00:00
|
|
|
props: {
|
|
|
|
error: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
head() {
|
2016-11-19 21:48:06 +00:00
|
|
|
return {
|
2017-09-01 15:59:20 +00:00
|
|
|
title: this.message,
|
|
|
|
meta: [
|
|
|
|
{
|
|
|
|
name: 'viewport',
|
|
|
|
content: 'width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'
|
|
|
|
}
|
2017-08-05 10:24:12 +00:00
|
|
|
]
|
2016-11-19 21:48:06 +00:00
|
|
|
}
|
2017-08-10 09:49:58 +00:00
|
|
|
},
|
|
|
|
computed: {
|
2018-10-24 13:46:06 +00:00
|
|
|
statusCode() {
|
2017-08-10 09:49:58 +00:00
|
|
|
return (this.error && this.error.statusCode) || 500
|
|
|
|
},
|
2018-10-24 13:46:06 +00:00
|
|
|
message() {
|
2018-07-12 20:45:14 +00:00
|
|
|
return this.error.message || `<%= messages.client_error %>`
|
2017-08-10 09:49:58 +00:00
|
|
|
}
|
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-09-01 16:40:01 +00:00
|
|
|
padding: 1rem;
|
2017-09-01 15:59:20 +00:00
|
|
|
background: #F7F8FB;
|
|
|
|
color: #47494E;
|
2017-08-05 17:04:27 +00:00
|
|
|
text-align: center;
|
2017-08-05 10:24:12 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
flex-direction: column;
|
2017-09-01 15:59:20 +00:00
|
|
|
font-family: sans-serif;
|
|
|
|
font-weight: 100 !important;
|
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
|
-webkit-text-size-adjust: 100%;
|
2018-03-19 18:03:54 +00:00
|
|
|
-webkit-font-smoothing: antialiased;
|
2017-09-01 15:59:20 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
2016-11-07 01:34:58 +00:00
|
|
|
}
|
2017-09-01 15:59:20 +00:00
|
|
|
.__nuxt-error-page .error {
|
|
|
|
max-width: 450px;
|
|
|
|
}
|
|
|
|
.__nuxt-error-page .title {
|
|
|
|
font-size: 1.5rem;
|
|
|
|
margin-top: 15px;
|
|
|
|
color: #47494E;
|
2018-03-19 18:03:54 +00:00
|
|
|
margin-bottom: 8px;
|
2017-09-01 15:59:20 +00:00
|
|
|
}
|
|
|
|
.__nuxt-error-page .description {
|
|
|
|
color: #7F828B;
|
|
|
|
line-height: 21px;
|
|
|
|
margin-bottom: 10px;
|
2016-11-07 01:34:58 +00:00
|
|
|
}
|
2017-08-05 19:33:07 +00:00
|
|
|
.__nuxt-error-page a {
|
2017-09-01 15:59:20 +00:00
|
|
|
color: #7F828B !important;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
.__nuxt-error-page .logo {
|
|
|
|
position: fixed;
|
2017-09-01 16:32:22 +00:00
|
|
|
left: 12px;
|
2017-09-01 15:59:20 +00:00
|
|
|
bottom: 12px;
|
2017-08-05 15:19:46 +00:00
|
|
|
}
|
2016-11-07 01:34:58 +00:00
|
|
|
</style>
|