diff options
-rw-r--r-- | components/Buttons/PlainButton.vue | 4 | ||||
-rw-r--r-- | components/PostLink.vue | 8 | ||||
-rw-r--r-- | components/PostList/PostList.vue | 11 |
3 files changed, 11 insertions, 12 deletions
diff --git a/components/Buttons/PlainButton.vue b/components/Buttons/PlainButton.vue index 6e0cde2..58a7f83 100644 --- a/components/Buttons/PlainButton.vue +++ b/components/Buttons/PlainButton.vue @@ -1,5 +1,5 @@ <template> - <button class="button" @click="$emit('click')">{{text}}</button> + <button class="button" @click="$emit('click')">{{ text }}</button> </template> <script> @@ -27,4 +27,4 @@ export default { text-align: center; font: 16px 'Roboto Slab'; } -</style> \ No newline at end of file +</style> diff --git a/components/PostLink.vue b/components/PostLink.vue index 9ee24b7..2dc3dd9 100644 --- a/components/PostLink.vue +++ b/components/PostLink.vue @@ -2,8 +2,8 @@ <div class="post-link"> <a :href="route"> <div class="post-container"> - <h4 class="post-title">{{title}}</h4> - <p class="post-description">{{shortenedDescription}}...</p> + <h4 class="post-title">{{ title }}</h4> + <p class="post-description">{{ shortenedDescription }}...</p> </div> </a> </div> @@ -54,10 +54,12 @@ export default { .post-link > a { text-decoration: none; + height: 100%; } .post-link .post-container { padding: 20px; + height: 100%; } .post-link .post-title { @@ -69,4 +71,4 @@ export default { color: #484848; font-size: 0.9em; } -</style> \ No newline at end of file +</style> diff --git a/components/PostList/PostList.vue b/components/PostList/PostList.vue index 2d1bb2d..781099f 100644 --- a/components/PostList/PostList.vue +++ b/components/PostList/PostList.vue @@ -15,21 +15,18 @@ export default { required: false } }, - async asyncData() { - return { - loading: process.client, - rawPosts: process.client ? undefined : k.getPosts() - } - }, data() { return { loading: true, - rawPosts: [] + rawPosts: undefined } }, mounted() { if (process.client && this.rawPosts === undefined) { this.loadPostsClient() + } else { + this.rawPosts = k.getPosts() + this.loading = false } }, computed: { |