diff --git a/; b/;
new file mode 100644
index 0000000..19e255c
--- /dev/null
+++ b/;
@@ -0,0 +1,39 @@
+
+
+
+
+
diff --git a/package.json b/package.json
index 0280f28..0fef851 100644
--- a/package.json
+++ b/package.json
@@ -35,11 +35,13 @@
"font-awesome": "^4.7.0",
"immutable": "^3.8.1",
"jquery": "^3.2.1",
+ "lodash": "^4.17.4",
"moment": "^2.18.1",
"querystring": "^0.2.0",
"rollup-plugin-json": "^2.1.1",
"showdown": "^1.6.4",
"spectre.css": "^0.2.14",
+ "twitter-widgets": "^1.0.0",
"whatwg-fetch": "^2.0.2"
}
}
diff --git a/src/scripts/app.tag b/src/scripts/app.tag
index 145ab87..075c26c 100644
--- a/src/scripts/app.tag
+++ b/src/scripts/app.tag
@@ -76,10 +76,18 @@ this.menuActive = false;
this.route.base('#!')
+function PostUpdated() {
+ riot.observable(this);
+ this.on("postupdated", () => { console.log("caught event"); });
+}
+
+var postObserver = new PostUpdated();
+
this.state = {
"_id" : false,
"projects" : Z.empty,
- "loaded" : false
+ "loaded" : false,
+ "postupdate" : postObserver
};
this.active = lens.actives({
@@ -90,7 +98,6 @@ this.active = lens.actives({
});
var self = this;
-
toggleMenu(ev) {
ev.preventDefault();
self.update({"menuActive" : !self.menuActive});
@@ -120,7 +127,9 @@ var links = activate("links");
function posts(_id) {
console.log(self.state);
- self.state._id = _id;
+ if (self.state._id != _id) {
+ self.state._id = _id;
+ }
activate("posts")();
self.update();
}
diff --git a/src/scripts/post.tag b/src/scripts/post.tag
index 5f97d9a..9f85df0 100644
--- a/src/scripts/post.tag
+++ b/src/scripts/post.tag
@@ -15,6 +15,8 @@
+
+
{ this.title }
@@ -36,6 +38,7 @@
+
diff --git a/src/templates/index.html b/src/templates/index.html
index 9a26534..1db3374 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -15,6 +15,24 @@
+