Add gathering title

This commit is contained in:
Jacob Karlsson
2018-07-07 12:41:38 +02:00
parent d09eab73ae
commit 3c608e0159
4 changed files with 10 additions and 2 deletions
+2
View File
@@ -0,0 +1,2 @@
node_modules/
package-lock.json
+2 -1
View File
@@ -411,7 +411,6 @@ exports.init = function (sbot, config) {
}}],
index: 'DTA'
}),
//pull.map(o => { console.log('bl:', o.value.content); return o }),
// Only grab messages about attendance
pull.filter(o => o.value.content.attendee !== undefined),
// Filter "can't attend"-messages
@@ -419,7 +418,9 @@ exports.init = function (sbot, config) {
pull.unique(o => o.value.content.attendee.link),
pull.collect((err, arr) => {
if (err) { cb(err) }
msg.value.content.numberAttending = arr.length
cb(null, msg)
})
)
+2
View File
@@ -29,6 +29,8 @@ module.exports = function (sbot, id, cb) {
if (typeof c.name == 'string') feedAbout.name = c.name.replace(/^@?/, '@')
if (c.image) feedAbout.image = linkDest(c.image)
if (c.description) feedAbout.description = c.description
if (c.title) feedAbout.title = c.title
if (c.startDateTime) feedAbout.startDateTime = c.startDateTime
if (c.publicWebHosting != null && author === c.about) feedAbout.publicWebHosting = defalsify(c.publicWebHosting)
}, function (err) {
if (err) return cb(err)
+4 -1
View File
@@ -537,8 +537,11 @@ function renderGathering(opts, id, c) {
desc.innerHTML = marked(c.about.description, opts.marked)
const image = h('p', h('img', { src: opts.img_base + c.about.image }))
const attending = h('h3.attending', c.numberAttending + ' attending')
const title = h('h2', c.about.title)
console.log('c', c)
return h('section',
[image,
[title,
image,
attending,
desc]
)