git ssb

0+

Daan Patchwork / ssb-viewer



forked from cel / ssb-viewer

Commit 3c608e0159f165149400aef6b07160373797b31b

Add gathering title

Jacob Karlsson committed on 7/7/2018, 10:41:38 AM
Parent: d09eab73ae3a9d7f447dfafca886750acd04e58d

Files changed

index.jschanged
lib/about.jschanged
render.jschanged
.gitignoreadded
index.jsView
@@ -410,17 +410,18 @@
410410 value: { content: { type: 'about' }},
411411 }}],
412412 index: 'DTA'
413413 }),
414- //pull.map(o => { console.log('bl:', o.value.content); return o }),
415414 // Only grab messages about attendance
416415 pull.filter(o => o.value.content.attendee !== undefined),
417416 // Filter "can't attend"-messages
418417 pull.filter(o => !o.value.content.attendee.remove),
419418 pull.unique(o => o.value.content.attendee.link),
420419 pull.collect((err, arr) => {
421420 if (err) { cb(err) }
421+
422422 msg.value.content.numberAttending = arr.length
423+
423424 cb(null, msg)
424425 })
425426 )
426427 })
lib/about.jsView
@@ -28,8 +28,10 @@
2828 var feedAbout = aboutByFeed[author] || (aboutByFeed[author] = {})
2929 if (typeof c.name == 'string') feedAbout.name = c.name.replace(/^@?/, '@')
3030 if (c.image) feedAbout.image = linkDest(c.image)
3131 if (c.description) feedAbout.description = c.description
32+ if (c.title) feedAbout.title = c.title
33+ if (c.startDateTime) feedAbout.startDateTime = c.startDateTime
3234 if (c.publicWebHosting != null && author === c.about) feedAbout.publicWebHosting = defalsify(c.publicWebHosting)
3335 }, function (err) {
3436 if (err) return cb(err)
3537 // Use whatever properties have the most counts.
render.jsView
@@ -536,10 +536,13 @@
536536 const desc = h('div')
537537 desc.innerHTML = marked(c.about.description, opts.marked)
538538 const image = h('p', h('img', { src: opts.img_base + c.about.image }))
539539 const attending = h('h3.attending', c.numberAttending + ' attending')
540+ const title = h('h2', c.about.title)
541+ console.log('c', c)
540542 return h('section',
541- [image,
543+ [title,
544+ image,
542545 attending,
543546 desc]
544547 )
545548 }
.gitignoreView
@@ -1,0 +1,2 @@
1+node_modules/
2+package-lock.json

Built with git-ssb-web