Add gathering title
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
node_modules/
|
||||||
|
package-lock.json
|
||||||
@@ -411,7 +411,6 @@ exports.init = function (sbot, config) {
|
|||||||
}}],
|
}}],
|
||||||
index: 'DTA'
|
index: 'DTA'
|
||||||
}),
|
}),
|
||||||
//pull.map(o => { console.log('bl:', o.value.content); return o }),
|
|
||||||
// Only grab messages about attendance
|
// Only grab messages about attendance
|
||||||
pull.filter(o => o.value.content.attendee !== undefined),
|
pull.filter(o => o.value.content.attendee !== undefined),
|
||||||
// Filter "can't attend"-messages
|
// Filter "can't attend"-messages
|
||||||
@@ -419,7 +418,9 @@ exports.init = function (sbot, config) {
|
|||||||
pull.unique(o => o.value.content.attendee.link),
|
pull.unique(o => o.value.content.attendee.link),
|
||||||
pull.collect((err, arr) => {
|
pull.collect((err, arr) => {
|
||||||
if (err) { cb(err) }
|
if (err) { cb(err) }
|
||||||
|
|
||||||
msg.value.content.numberAttending = arr.length
|
msg.value.content.numberAttending = arr.length
|
||||||
|
|
||||||
cb(null, msg)
|
cb(null, msg)
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ module.exports = function (sbot, id, cb) {
|
|||||||
if (typeof c.name == 'string') feedAbout.name = c.name.replace(/^@?/, '@')
|
if (typeof c.name == 'string') feedAbout.name = c.name.replace(/^@?/, '@')
|
||||||
if (c.image) feedAbout.image = linkDest(c.image)
|
if (c.image) feedAbout.image = linkDest(c.image)
|
||||||
if (c.description) feedAbout.description = c.description
|
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)
|
if (c.publicWebHosting != null && author === c.about) feedAbout.publicWebHosting = defalsify(c.publicWebHosting)
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
|
|||||||
@@ -537,8 +537,11 @@ function renderGathering(opts, id, c) {
|
|||||||
desc.innerHTML = marked(c.about.description, opts.marked)
|
desc.innerHTML = marked(c.about.description, opts.marked)
|
||||||
const image = h('p', h('img', { src: opts.img_base + c.about.image }))
|
const image = h('p', h('img', { src: opts.img_base + c.about.image }))
|
||||||
const attending = h('h3.attending', c.numberAttending + ' attending')
|
const attending = h('h3.attending', c.numberAttending + ' attending')
|
||||||
|
const title = h('h2', c.about.title)
|
||||||
|
console.log('c', c)
|
||||||
return h('section',
|
return h('section',
|
||||||
[image,
|
[title,
|
||||||
|
image,
|
||||||
attending,
|
attending,
|
||||||
desc]
|
desc]
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user