aboutsummaryrefslogtreecommitdiff
path: root/src/html/bread.html
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2019-01-28 12:12:13 -0500
committerMark Powers <markppowers0@gmail.com>2019-01-28 12:12:13 -0500
commit80ee170990e78753d07779d59bdfe516c399d254 (patch)
treed058cb57340e4eb0b349b8ac65afd105760c7dd0 /src/html/bread.html
parenta6f52178eb79da9415d2770f2245f2cea8a05808 (diff)
Make home page a feed
Diffstat (limited to 'src/html/bread.html')
-rw-r--r--src/html/bread.html19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/html/bread.html b/src/html/bread.html
index 37abee8..8004803 100644
--- a/src/html/bread.html
+++ b/src/html/bread.html
@@ -8,17 +8,20 @@
<link rel="stylesheet" type="text/css" href="/css/bootstrap.css">
<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>
window.onload = function () {
- fetch(new Request('/posts.json')).then(response => response.json())
- .then(response => {
- var feed = new Vue({
- el: '.feed',
- data: { posts: response.data }
- })
- });
+ var feed = new Vue({
+ el: '.feed',
+ data: {
+ posts: []
+ },
+ created() {
+ fetch(new Request('/bread/posts.json')).then(response => response.json())
+ .then(response => this.posts = response.data);
+ }
+ });
}
-
</script>
</head>