diff --git a/src/scripts/app.tag b/src/scripts/app.tag index 2b1f088..d019c3a 100644 --- a/src/scripts/app.tag +++ b/src/scripts/app.tag @@ -176,10 +176,9 @@ menuOff(ev) { function activate(page) { return function() { if (page !== "posts") { - document.title = `${page.slice(0,1).toUpperCase()}${page.slice(1,page.length)}`; + document.title = page.slice(0,1).toUpperCase()+" "+page.slice(1,page.length); self.currentPage = document.title; } - console.log(`activating ${page}`); self.active = lens.setActive(self.active, page); self.update(); }; @@ -222,7 +221,7 @@ self.one("updated", () => { function loaduser() { /* https://api.github.com/users/${self.username}/repos?sort=updated&direction=desc */ - self.cached(`/blog/projects`) + self.cached("/blog/projects") .then((resp) => resp.json()) .then((resp) => { self.state.projects = Z.fromList( @@ -235,7 +234,7 @@ function loaduser() { } function getcategories() { - self.cached(`/blog/categories`) + self.cached("/blog/categories") .then((resp) => resp.json()) .then((resp) => { self.categories = resp; diff --git a/src/scripts/editor.tag b/src/scripts/editor.tag index e28879b..5b16ea0 100644 --- a/src/scripts/editor.tag +++ b/src/scripts/editor.tag @@ -214,7 +214,7 @@ loadPost(_id) { return false; } self.update({"loading" : true}); - axios.get(`/blog/getpost/${_id.slice(-8)}`) + axios.get("/blog/getpost/"+_id.slice(-8)) .then(function(resp) { self.update({"loading" : false}); self.refs.textarea.value = resp.data.content; @@ -240,7 +240,7 @@ deletePost(_id) { return false; } self.update({"loading" : true}); - axios.get(`/blog/deletepost/${self._id}`) + axios.get("/blog/deletepost/"+self._id) .then(function(resp) { console.log(resp); self.listPosts(); @@ -256,7 +256,6 @@ listPosts() { axios.get("/blog/allposts") .then(function(resp) { var postsList = Z.extend(Z.empty, resp.data); - console.log(`trying to load post with id ${Z.focus(postsList, self.defaultPost)._id}`); var currentPost = Z.focus(postsList, self.defaultPost); if (currentPost == self.defaultPost) { diff --git a/src/scripts/links.tag b/src/scripts/links.tag index 7e1730c..7c385bd 100644 --- a/src/scripts/links.tag +++ b/src/scripts/links.tag @@ -45,7 +45,7 @@ self.groups = [] getLinks() { self.update({"loading" : true}); - self.opts.cached(`/blog/links/`) + self.opts.cached("/blog/links/") .then((resp) => resp.text()) .then((resp) => { self.update( diff --git a/src/scripts/post.tag b/src/scripts/post.tag index 122f5f8..7972107 100644 --- a/src/scripts/post.tag +++ b/src/scripts/post.tag @@ -131,7 +131,7 @@ updatePost(postcontent) { self.loading = false; self.prevloading = ""; self.nextloading = ""; - self.route(`/posts/${self._id}`); + self.route("/posts/"+self._id); RiotControl.trigger("postswitch", {"title" : self.title}); @@ -145,7 +145,7 @@ updatePost(postcontent) { nextPost(_id) { self.update({"loading" : true}); - self.opts.cached(`/blog/switchpost/${_id.slice(-hashLength)}/${self.category}`) + self.opts.cached("/blog/switchpost/"+_id.slice(-hashLength)+"/"+self.category) .then((resp) => resp.text()) .then((resp) => { var content = JSON.parse(resp); @@ -165,7 +165,7 @@ nextPost(_id) { prevPost(_id) { self.update({"loading" : true}); - self.opts.cached(`/blog/prevpost/${_id.slice(-hashLength)}/${self.category}`) + self.opts.cached("/blog/prevpost/"+_id.slice(-hashLength)+"/"+self.category) .then((resp) => resp.text()) .then((resp) => { self.updatePost(JSON.parse(resp)) @@ -176,7 +176,7 @@ getPost(_id) { self.update({"loading" : true}); var url; if (_id !== undefined && _id) { - url = `/blog/getpost/${_id.slice(-hashLength)}/${self.category}`; + url = "/blog/getpost/"+_id.slice(-hashLength)+"/"+self.category; } else { url = "/blog/switchpost/"; diff --git a/src/scripts/projects.tag b/src/scripts/projects.tag index ed49a93..b21ae4e 100644 --- a/src/scripts/projects.tag +++ b/src/scripts/projects.tag @@ -15,7 +15,7 @@