|
@ -33,7 +33,7 @@ |
|
|
show={menuActive} |
|
|
show={menuActive} |
|
|
class="mobile-menu tab tab-block menu"> |
|
|
class="mobile-menu tab tab-block menu"> |
|
|
<li |
|
|
<li |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
each="{page in ['browse', 'projects', 'links', 'about']}" |
|
|
class={"navigate-tab tab-item " + (parent.active.get(page) ? "active" : "")} |
|
|
class={"navigate-tab tab-item " + (parent.active.get(page) ? "active" : "")} |
|
|
data-is="navtab" |
|
|
data-is="navtab" |
|
|
active={parent.active.get(page)} |
|
|
active={parent.active.get(page)} |
|
@ -47,7 +47,7 @@ |
|
|
|
|
|
|
|
|
<ul class="hide-md hide-sm hide-xs navigate tab tab-block"> |
|
|
<ul class="hide-md hide-sm hide-xs navigate tab tab-block"> |
|
|
<li |
|
|
<li |
|
|
each="{page in ['posts', 'projects', 'links', 'about']}" |
|
|
each="{page in ['browse', 'projects', 'links', 'about']}" |
|
|
class={"navigate-tab tab-item " + (parent.active.get(page) ? "active" : "")} |
|
|
class={"navigate-tab tab-item " + (parent.active.get(page) ? "active" : "")} |
|
|
data-is="navtab" |
|
|
data-is="navtab" |
|
|
active={parent.active.get(page)} |
|
|
active={parent.active.get(page)} |
|
@ -129,15 +129,6 @@ document.addEventListener("click", function(event) { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
window.RiotControl.on("postswitch", |
|
|
|
|
|
(ev) => { |
|
|
|
|
|
self.update( |
|
|
|
|
|
{ |
|
|
|
|
|
"currentPage" : ev.title |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
self.state = { |
|
|
self.state = { |
|
|
"page" : self.opts.page, |
|
|
"page" : self.opts.page, |
|
|
"results" : self.decode(self.opts.results), |
|
|
"results" : self.decode(self.opts.results), |
|
@ -221,8 +212,7 @@ to(name) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
self.on("mount", () => { |
|
|
self.on("mount", () => { |
|
|
window.RiotControl.addStore(new riot.observable()); |
|
|
window.RiotControl.on("openpost", |
|
|
RiotControl.on("openpost", |
|
|
|
|
|
(id) => { |
|
|
(id) => { |
|
|
console.log("caught the event in the app tag"); |
|
|
console.log("caught the event in the app tag"); |
|
|
console.log(`the id is ${id}`); |
|
|
console.log(`the id is ${id}`); |
|
@ -230,6 +220,16 @@ self.on("mount", () => { |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
window.RiotControl.on("postswitch", |
|
|
|
|
|
(ev) => { |
|
|
|
|
|
console.log("updating the title"); |
|
|
|
|
|
self.update( |
|
|
|
|
|
{ |
|
|
|
|
|
"currentPage" : ev.title |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
self.route.base('/blog/') |
|
|
self.route.base('/blog/') |
|
|
self.route("/", () => { self.route(`/posts/${self.state._id}`); }); |
|
|
self.route("/", () => { self.route(`/posts/${self.state._id}`); }); |
|
|
self.route("/posts", () => { self.route(`/posts/${self.state._id}`); }); |
|
|
self.route("/posts", () => { self.route(`/posts/${self.state._id}`); }); |
|
@ -244,10 +244,5 @@ self.on("mount", () => { |
|
|
route.start(true); |
|
|
route.start(true); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
self.on("unmount", () => { |
|
|
|
|
|
RiotControl.off("openpost"); |
|
|
|
|
|
RiotControl.off("postswitch"); |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|
</app> |
|
|
</app> |
|
|