From 0f2d21603df91e7285c4a50da9d9dadf95f600b6 Mon Sep 17 00:00:00 2001 From: cel Date: Sat, 30 Dec 2017 16:54:54 -1000 Subject: Render about-resource messages --- lib/render-msg.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/render-msg.js b/lib/render-msg.js index 92f8531..d4ad670 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -286,6 +286,7 @@ RenderMsg.prototype.message = function (cb) { case 'talenet-idea-update': return this.ideaUpdate(cb) case 'talenet-idea-comment': case 'talenet-idea-comment_reply': return this.ideaComment(cb) + case 'about-resource': return this.aboutResource(cb) default: return this.object(cb) } } @@ -1627,3 +1628,13 @@ RenderMsg.prototype.ideaComment = function (cb) { ]), cb) }) } + +RenderMsg.prototype.aboutResource = function (cb) { + var self = this + return self.wrap(h('div', + 'describes resource ', + h('a', {href: self.toUrl(self.c.about)}, self.c.name), + ':', + h('blockquote', {innerHTML: self.render.markdown(self.c.description)}) + ), cb) +} -- cgit v1.2.3