about summary refs log tree commit diff
path: root/components
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-12-01 14:40:25 +0100
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-12-01 14:40:25 +0100
commit5bd9880c585cbfde37640e4929009cee5421a2a4 (patch)
tree54da696a013555646e4b7a55ed0394294c4addbd /components
parenta28d5383f973e26da70b738f4a319083c45551af (diff)
downloadpuszcza-5bd9880c585cbfde37640e4929009cee5421a2a4.tar.gz
puszcza-5bd9880c585cbfde37640e4929009cee5421a2a4.zip
Fix postlink size
Diffstat (limited to 'components')
-rw-r--r--components/Buttons/PlainButton.vue4
-rw-r--r--components/PostLink.vue8
-rw-r--r--components/PostList/PostList.vue11
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: {