Commit 0f2d21603df91e7285c4a50da9d9dadf95f600b6
Render about-resource messages
cel committed on 12/31/2017, 2:55:41 AMParent: c3d96d538721cc63ce7226a5ccf0bf754ec5054e
Files changed
lib/render-msg.js | changed |
lib/render-msg.js | |||
---|---|---|---|
@@ -285,8 +285,9 @@ | |||
285 | 285 … | case 'talenet-idea-hat': return this.ideaHat(cb) | |
286 | 286 … | case 'talenet-idea-update': return this.ideaUpdate(cb) | |
287 | 287 … | case 'talenet-idea-comment': | |
288 | 288 … | case 'talenet-idea-comment_reply': return this.ideaComment(cb) | |
289 … | + case 'about-resource': return this.aboutResource(cb) | ||
289 | 290 … | default: return this.object(cb) | |
290 | 291 … | } | |
291 | 292 … | } | |
292 | 293 … | ||
@@ -1626,4 +1627,14 @@ | |||
1626 | 1627 … | h('div', {innerHTML: self.render.markdown(self.c.text)}) : '' | |
1627 | 1628 … | ]), cb) | |
1628 | 1629 … | }) | |
1629 | 1630 … | } | |
1631 … | + | ||
1632 … | +RenderMsg.prototype.aboutResource = function (cb) { | ||
1633 … | + var self = this | ||
1634 … | + return self.wrap(h('div', | ||
1635 … | + 'describes resource ', | ||
1636 … | + h('a', {href: self.toUrl(self.c.about)}, self.c.name), | ||
1637 … | + ':', | ||
1638 … | + h('blockquote', {innerHTML: self.render.markdown(self.c.description)}) | ||
1639 … | + ), cb) | ||
1640 … | +} |
Built with git-ssb-web