From 808e89b024bed961cecd06c9e987dd0349458b92 Mon Sep 17 00:00:00 2001
From: Andrew Lee <alee14498@protonmail.com>
Date: Fri, 1 May 2020 13:44:35 -0400
Subject: Finally implemented blog posts

---
 pages/blog/index.vue | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

(limited to 'pages/blog/index.vue')

diff --git a/pages/blog/index.vue b/pages/blog/index.vue
index 2e10eba..5619e6b 100644
--- a/pages/blog/index.vue
+++ b/pages/blog/index.vue
@@ -7,13 +7,13 @@
             </header>
         </v-card>
         <v-container>
-            <v-col cols="6">
-                <v-card to="/">
-                    <v-card-title>Blog Post Title</v-card-title>
-                    <v-card-text>Content</v-card-text>
+            <div v-for="post in blogPosts" :key="post.title">
+                <v-card :to="'/blog/' + post.slug">
+                    <v-card-title>{{ post.title }}</v-card-title>
+                    <v-card-subtitle>Created on {{post.date}}</v-card-subtitle>
+                    <v-card-text>{{ post.description }}</v-card-text>
                 </v-card>
-                <br>
-            </v-col>
+            </div>
         </v-container>
     </div>
 </template>
@@ -23,6 +23,11 @@ export default {
   name: 'blog',
   head: {
     title: 'Blog'
+  },
+  computed: {
+    blogPosts () {
+      return this.$store.state.blogPosts
+    }
   }
 }
 
-- 
cgit v1.2.3

