From fe81f3d551f00d8a5ee5ee4c738e02ffc2d06ecb Mon Sep 17 00:00:00 2001
From: Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>
Date: Wed, 27 Nov 2019 23:42:38 +0100
Subject: Add PlainButton

---
 components/Buttons/PlainButton.vue | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 components/Buttons/PlainButton.vue

(limited to 'components/Buttons/PlainButton.vue')

diff --git a/components/Buttons/PlainButton.vue b/components/Buttons/PlainButton.vue
new file mode 100644
index 0000000..6e0cde2
--- /dev/null
+++ b/components/Buttons/PlainButton.vue
@@ -0,0 +1,30 @@
+<template>
+  <button class="button" @click="$emit('click')">{{text}}</button>
+</template>
+
+<script>
+export default {
+  name: 'PlainButton',
+  props: {
+    text: {
+      type: String,
+      required: true
+    }
+  }
+}
+</script>
+
+<style scoped>
+.button {
+  background-color: #507b34;
+  padding: 10px;
+  max-width: 150px;
+  border: none;
+
+  cursor: pointer;
+
+  color: #ffffff;
+  text-align: center;
+  font: 16px 'Roboto Slab';
+}
+</style>
\ No newline at end of file
-- 
cgit 1.4.1


From 5bd9880c585cbfde37640e4929009cee5421a2a4 Mon Sep 17 00:00:00 2001
From: Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>
Date: Sun, 1 Dec 2019 14:40:25 +0100
Subject: Fix postlink size

---
 components/Buttons/PlainButton.vue |  4 ++--
 components/PostLink.vue            |  8 +++++---
 components/PostList/PostList.vue   | 11 ++++-------
 3 files changed, 11 insertions(+), 12 deletions(-)

(limited to 'components/Buttons/PlainButton.vue')

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: {
-- 
cgit 1.4.1


From a5c19262912ee12935ec268407ed20817a1343c4 Mon Sep 17 00:00:00 2001
From: Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>
Date: Wed, 4 Dec 2019 08:35:17 +0100
Subject: Add hover

---
 components/Buttons/PlainButton.vue | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'components/Buttons/PlainButton.vue')

diff --git a/components/Buttons/PlainButton.vue b/components/Buttons/PlainButton.vue
index 58a7f83..0bf57cc 100644
--- a/components/Buttons/PlainButton.vue
+++ b/components/Buttons/PlainButton.vue
@@ -27,4 +27,8 @@ export default {
   text-align: center;
   font: 16px 'Roboto Slab';
 }
+
+.button:hover {
+  background-color: #42642b;
+}
 </style>
-- 
cgit 1.4.1

