Skip to content

Commit

Permalink
Migrate error page to Bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
kenmickles committed Apr 7, 2020
1 parent 9b7805c commit de1a581
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
31 changes: 9 additions & 22 deletions layouts/error.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
<i18n src="~/locales/layouts/error.yml"></i18n>

<template>
<DefaultLayout>
<section class="sml-pad-y3 med-pad-y6">
<div class="wrapper">
<div class="row">
<div class="sml-c12 lrg-c8 grid-center text-center">
<h1 v-if="error.statusCode === 404">{{ $t('404_title') }}</h1>
<h1 v-else>{{ error.statusCode }} - {{ error.message }}</h1>
<p class="sml-push-y2 med-push-y3">
{{ $t('return') }}
<nuxt-link :to="localePath('index')">{{ $t('homepage') }}</nuxt-link>.
</p>
</div> <!-- .c -->
</div> <!-- .row -->
</div> <!-- .wrapper -->
</section>
</DefaultLayout>
<div class="jumbotron jumbotron-fluid text-center">
<h1 class="display-4">
<span v-if="error.statusCode === 404">{{ $t('404_title') }}</span>
<span v-else>{{ error.statusCode }} - {{ error.message }}</span>
</h1>
<p class="lead">
<nuxt-link :to="localePath('index')">{{ $t('return_home') }}</nuxt-link>
</p>
</div>
</template>

<script>
import DefaultLayout from '~/components/DefaultLayout'
export default {
components: {
DefaultLayout
},
props: {
error: {
type: Object,
Expand Down
5 changes: 2 additions & 3 deletions locales/layouts/error.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
en:
404_title: 404 - Page not found
return: Return to the
homepage: homepage
404_title: 404 - Page not found 😳
return_home: Return to the home page.

0 comments on commit de1a581

Please sign in to comment.