2018-10-14 06:45:44 +00:00
|
|
|
<template lang="pug">
|
2018-10-18 05:13:18 +00:00
|
|
|
ul.blog-items
|
|
|
|
li.blog-item(v-for='(post, index) in listing' v-if='!post.draft')
|
|
|
|
nuxt-link(:to='post.path')
|
|
|
|
span.post-title {{ post.title }}
|
|
|
|
span.post-date {{ post.date | prettifyDate }}
|
|
|
|
.post-tagline {{ post.tagline }}
|
|
|
|
hr(v-if='index < listing.length - 1')
|
2018-10-14 06:45:44 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-10-18 05:13:18 +00:00
|
|
|
async asyncData({ app }) {
|
2018-10-14 06:45:44 +00:00
|
|
|
return {
|
2018-10-18 05:13:18 +00:00
|
|
|
listing: await app
|
|
|
|
.$content('/')
|
|
|
|
.query({ exclude: ['body', 'meta', 'permalink', 'anchors'] })
|
|
|
|
.getAll()
|
2018-10-14 06:45:44 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
layout: 'compact'
|
|
|
|
}
|
|
|
|
</script>
|
2018-10-18 05:13:18 +00:00
|
|
|
|
|
|
|
<style lang="sass" scoped>
|
|
|
|
@import '~assets/sass/utilities'
|
|
|
|
|
|
|
|
.blog-items
|
|
|
|
+desktop
|
|
|
|
width: 75%
|
|
|
|
margin: 0 auto
|
|
|
|
.blog-item
|
|
|
|
margin-bottom: 3rem
|
|
|
|
.post-title
|
|
|
|
font-size: $size-medium
|
|
|
|
.post-date
|
|
|
|
float: right
|
|
|
|
.post-tagline
|
|
|
|
font-size: $size-normal
|
|
|
|
color: $grey-light
|
|
|
|
margin-bottom: 1rem
|
|
|
|
width: fit-content
|
|
|
|
</style>
|