aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-03 15:49:56 -0800
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-02-04 02:53:53 -0800
commitb85860fda2946cbb2b29a5cee4bf0f27c3813e1e (patch)
tree5288498dbad61e512ce46a11e41f5e878b355bad /lib
parent4d7791fb6b9fc2c1063b88069fd8aa2bad0c18f2 (diff)
downloadpatchfoo-b85860fda2946cbb2b29a5cee4bf0f27c3813e1e.tar.gz
patchfoo-b85860fda2946cbb2b29a5cee4bf0f27c3813e1e.zip
Render about description
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js1
-rw-r--r--lib/serve.js29
2 files changed, 19 insertions, 11 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 6b0513d..8285121 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -307,6 +307,7 @@ RenderMsg.prototype.about = function (cb) {
['identifies ', h('a', {href: this.toUrl(this.c.about)}, truncate(this.c.about, 10))],
' as ',
this.c.name ? [h('ins', this.c.name), ' '] : '',
+ this.c.description ? h('div', {innerHTML: this.c.description}) : '',
img ? [
h('br'),
h('a', {href: this.toUrl(img)},
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)
+ })
})
}