Skip to content

Instantly share code, notes, and snippets.

@Kaperskyguru
Created April 30, 2020 23:05
Show Gist options
  • Save Kaperskyguru/8a34ae9de1b3b9e55c366b9291f20cf6 to your computer and use it in GitHub Desktop.
Save Kaperskyguru/8a34ae9de1b3b9e55c366b9291f20cf6 to your computer and use it in GitHub Desktop.
<template>
<div class="container-fluid">
<div class="p-4 justify-content-center">
<logo />
</div>
<div class="row">
<post v-for="(post, i) in posts" :key="i" :post="post" />
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import Logo from '~/components/Logo.vue'
import Post from '~/components/Post.vue'
export default {
components: {
Logo,
Post
},
async fetch({ store }) {
await store.dispatch('post/get_posts')
},
computed: {
...mapState({
posts: (state) => {
return state.post.posts
}
})
}
}
</script>
<style>
.container {
margin: 0 auto;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.title {
font-family: 'Quicksand', 'Source Sans Pro', -apple-system, BlinkMacSystemFont,
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
display: block;
font-weight: 300;
font-size: 100px;
color: #35495e;
letter-spacing: 1px;
}
.subtitle {
font-weight: 300;
font-size: 42px;
color: #526488;
word-spacing: 5px;
padding-bottom: 15px;
}
.links {
padding-top: 15px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment