From b85860fda2946cbb2b29a5cee4bf0f27c3813e1e Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 3 Feb 2017 15:49:56 -0800 Subject: Render about description --- lib/serve.js | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'lib/serve.js') diff --git a/lib/serve.js b/lib/serve.js index 11315b6..f104e3a 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -608,18 +608,25 @@ Serve.prototype.wrapPage = function (title, searchQ) { Serve.prototype.wrapUserFeed = function (id) { var self = this return u.hyperwrap(function (thread, cb) { - var done = multicb({pluck: 1, spread: true}) - done()(null, [ - h('section.ssb-feed', - h('h3.feed-name', - self.app.render.avatarImage(id, done()), ' ', - h('strong', self.app.render.idLink(id, done())) + self.app.getAbout(id, function (err, about) { + if (err) return cb(err) + var done = multicb({pluck: 1, spread: true}) + done()(null, [ + h('section.ssb-feed', + h('table', h('tr', + h('td', self.app.render.avatarImage(id, done())), + h('td.feed-about', + h('h3.feed-name', + h('strong', self.app.render.idLink(id, done()))), + h('code', h('small', id)), + about.description ? h('div', + {innerHTML: self.app.render.markdown(about.description)}) : '' + ))) ), - h('code', h('small', id)) - ), - thread - ]) - done(cb) + thread + ]) + done(cb) + }) }) } -- cgit v1.2.3