diff options
author | Mark Powers <markppowers0@gmail.com> | 2020-02-08 22:09:35 -0600 |
---|---|---|
committer | Mark Powers <markppowers0@gmail.com> | 2020-02-08 22:09:35 -0600 |
commit | ddddb356181baefbb03cbf710c9b6210b4d8de52 (patch) | |
tree | d2375dacf53e03370f3faa2fe714a4b4753a1354 /src/html/blog-single.html | |
parent | 7c3bb05841202dfc017cbd8ad872009819ccc581 (diff) |
Remove client side markdown, add single posts to all feeds
Diffstat (limited to 'src/html/blog-single.html')
-rw-r--r-- | src/html/blog-single.html | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/html/blog-single.html b/src/html/blog-single.html deleted file mode 100644 index 75cbf92..0000000 --- a/src/html/blog-single.html +++ /dev/null @@ -1,61 +0,0 @@ -<!doctype html> -<html lang="en"> - -<head> - <title>Mark's Kitchen - Blog</title> - <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="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 = function () { - var feed = new Vue({ - el: '.feed', - data: { - posts: [] - }, - created() { - var id = parseInt(window.location.pathname.split("/")[2]); - fetch(new Request('/posts/blog')).then(response => response.json()) - .then(response => { response.forEach(post => { - if(post.id == id){ - post.description = marked(post.description) - this.posts.push(post); - } - }); - }); - } - }); - } - </script> -</head> - -<body> - <div> - <h1> - <a class="navigation" href="/" title="marks.kitchen"><</a> - <a class="navigation" href="/blog" title="marks.kitchen/blog"><</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> - -</html>
\ No newline at end of file |