diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-02-03 15:49:56 -0800 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-02-04 02:53:53 -0800 |
commit | b85860fda2946cbb2b29a5cee4bf0f27c3813e1e (patch) | |
tree | 5288498dbad61e512ce46a11e41f5e878b355bad /lib/serve.js | |
parent | 4d7791fb6b9fc2c1063b88069fd8aa2bad0c18f2 (diff) | |
download | patchfoo-b85860fda2946cbb2b29a5cee4bf0f27c3813e1e.tar.gz patchfoo-b85860fda2946cbb2b29a5cee4bf0f27c3813e1e.zip |
Render about description
Diffstat (limited to 'lib/serve.js')
-rw-r--r-- | lib/serve.js | 29 |
1 files changed, 18 insertions, 11 deletions
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) + }) }) } |