diff --git a/src/scripts/post.tag b/src/scripts/post.tag index c880808..45e7170 100644 --- a/src/scripts/post.tag +++ b/src/scripts/post.tag @@ -1,17 +1,17 @@
- - + +

No More Posts!

-
+

{ opts.title }

By { opts.creator }
-

{ content }

+

{ this.content }

@@ -32,9 +32,10 @@ this.nextloading = ""; this.nomore = false this.pid = 1; -content = ""; +this.content = ""; -prev() { +prev(ev) { + ev.preventDefault(); if (self.prevloading || self.nextloading) { return; } @@ -49,7 +50,9 @@ prev() { } } -next() { +next(ev) { + console.log("next event fired"); + ev.preventDefault(); if (self.nextloading || self.prevloading) { return; } @@ -64,11 +67,15 @@ next() { } this.setPost = function(pid) { - self.update(); - self.loading = true; + console.log("trying to change the post"); + console.log(fetch); + this.update(); + console.log("updated"); + this.loading = true; fetch("/blog/switchpost/"+pid) .then( function(resp) { + console.log("got a response"); return resp.text(); }) .then( diff --git a/src/scripts/riotblog.js b/src/scripts/riotblog.js index 8e8b449..0a8fa2a 100644 --- a/src/scripts/riotblog.js +++ b/src/scripts/riotblog.js @@ -11,5 +11,4 @@ riot.mount("post", "title" : "A cool post here" }); -riot.mount("comments"); riot.mount("bbutton");