diff options
Diffstat (limited to 'src/html/blog.html')
-rw-r--r-- | src/html/blog.html | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/html/blog.html b/src/html/blog.html index 4a35319..c034711 100644 --- a/src/html/blog.html +++ b/src/html/blog.html @@ -6,12 +6,11 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" type="text/css" href="/css/styles.css"> - <script src="/js/feed.js"></script> <script src="https://cdn.jsdelivr.net/npm/vue"></script> <!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> --> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script> - window.onload = loadFeed(function () { + window.onload = function () { var feed = new Vue({ el: '.feed', data: { @@ -26,14 +25,32 @@ }); } }); - }) + } </script> </head> <body> <div> - <h1>Blog</h1> - <div id="feed"></div> + <h1> + <a class="navigation" href="/" title="marks.kitchen"><</a> + Blog + </h1> + <div id="feed" class="feed"> + <div class="card" v-for="post in posts"> + <p class="card-text" v-html="post.description"></p> + <div class="card-img"> + <span v-for="image in post.images"> + <a v-bind:href="image"><img v-bind:src="image"></a> + </span> + </div> + <p class="date"> + <a v-bind:href="'/blog/'+post.id">{{ post.createdAt.substring(0,10) }}</a> + <span v-for="tag in post.tags"> + <a class="tag" v-bind:href="'/tags#'+tag">{{tag}}</a> + </span> + </p> + </div> + </div> </div> </body> |