Skip to content
Permalink
Browse files

Fix error layout and update shelf item dates

  • Loading branch information
emdecr committed Feb 26, 2020
1 parent 48a43f9 commit 1757411860d77fd7421e9e35ea682a6ee3b90cf0
Showing with 36 additions and 8 deletions.
  1. +7 −3 app/components/shelf.vue
  2. +29 −5 app/layouts/error.vue
@@ -13,15 +13,19 @@
rel
>
<div class="shelf-item__content text-align--c">
<span class="text-align--c" v-html="item.title.rendered"></span>
<span class="text-align--c bold" v-html="item.title.rendered"></span>
<img
v-if="item.hasOwnProperty('_embedded')"
:src="image(item)"
:alt="item.title.rendered"
>
</div>
<div class="shelf-item__bottom"></div>
<span class="text-align--c time-ago">Added {{$moment(item.date).fromNow() }}</span>
<span class="text-align--c time-ago">
Added {{$moment(item.date).fromNow() }} on
<br>
{{$moment(item.date).format('ll') }}
</span>
</a>
</div>
<div class="flex-all flex--jc-c flex--ai-c">
@@ -146,7 +150,7 @@ export default {
// .shelf-item__content span
.shelf-item span {
font-family: "input-mono", monospace;
font-weight: 100;
// font-weight: 100;
font-style: normal;
font-size: 0.7rem;
margin-bottom: 0.5rem;
@@ -1,23 +1,32 @@
<template>
<div>
<nuxt-link class="skip-main" :to="{ path: $route.path,hash:'main-content'}">Skip to main content</nuxt-link>
<comp-header/>
<transition name="fade">
<div id="main-content">
<h1 v-if="error.statusCode === 404">Page not found</h1>
<h1 v-else>An error occurred</h1>
<nuxt-link to="/">Home page</nuxt-link>
<div class="content">
<h1
v-if="error.statusCode === 404"
class="mono"
>{{error.statusCode}} The content you’re looking for doesn’t exist (...yet)</h1>
<h1 v-else>An error occurred</h1>
<nuxt-link to="/">Go to the home page</nuxt-link>
</div>
</div>
</transition>
<comp-footer/>
</div>
</template>

<script>
import Header from "~/components/header.vue";
import Footer from "~/components/footer.vue";
export default {
props: ["error"],
loading: {
failedColor: "#e3e3e3"
},
components: {
"comp-header": Header,
"comp-footer": Footer
}
// layout: "" // you can set a custom layout for the error page
};
@@ -34,4 +43,19 @@ export default {
.fade-leave-to {
opacity: 0;
}
a {
display: inline-block;
margin-top: 2rem;
}
.content {
max-width: 700px;
margin: 0 auto;
padding: 0 2rem;
}
h1 {
font-size: 30px;
}
</style>

0 comments on commit 1757411

Please sign in to comment.
You can’t perform that action at this time.