Commit 3c608e0159f165149400aef6b07160373797b31b
Add gathering title
Jacob Karlsson committed on 7/7/2018, 10:41:38 AMParent: d09eab73ae3a9d7f447dfafca886750acd04e58d
Files changed
index.js | changed |
lib/about.js | changed |
render.js | changed |
.gitignore | added |
index.js | |||
---|---|---|---|
@@ -410,17 +410,18 @@ | |||
410 | 410 … | value: { content: { type: 'about' }}, | |
411 | 411 … | }}], | |
412 | 412 … | index: 'DTA' | |
413 | 413 … | }), | |
414 | - //pull.map(o => { console.log('bl:', o.value.content); return o }), | ||
415 | 414 … | // Only grab messages about attendance | |
416 | 415 … | pull.filter(o => o.value.content.attendee !== undefined), | |
417 | 416 … | // Filter "can't attend"-messages | |
418 | 417 … | pull.filter(o => !o.value.content.attendee.remove), | |
419 | 418 … | pull.unique(o => o.value.content.attendee.link), | |
420 | 419 … | pull.collect((err, arr) => { | |
421 | 420 … | if (err) { cb(err) } | |
421 … | + | ||
422 | 422 … | msg.value.content.numberAttending = arr.length | |
423 … | + | ||
423 | 424 … | cb(null, msg) | |
424 | 425 … | }) | |
425 | 426 … | ) | |
426 | 427 … | }) |
lib/about.js | ||
---|---|---|
@@ -28,8 +28,10 @@ | ||
28 | 28 … | var feedAbout = aboutByFeed[author] || (aboutByFeed[author] = {}) |
29 | 29 … | if (typeof c.name == 'string') feedAbout.name = c.name.replace(/^@?/, '@') |
30 | 30 … | if (c.image) feedAbout.image = linkDest(c.image) |
31 | 31 … | if (c.description) feedAbout.description = c.description |
32 … | + if (c.title) feedAbout.title = c.title | |
33 … | + if (c.startDateTime) feedAbout.startDateTime = c.startDateTime | |
32 | 34 … | if (c.publicWebHosting != null && author === c.about) feedAbout.publicWebHosting = defalsify(c.publicWebHosting) |
33 | 35 … | }, function (err) { |
34 | 36 … | if (err) return cb(err) |
35 | 37 … | // Use whatever properties have the most counts. |
render.js | ||
---|---|---|
@@ -536,10 +536,13 @@ | ||
536 | 536 … | const desc = h('div') |
537 | 537 … | desc.innerHTML = marked(c.about.description, opts.marked) |
538 | 538 … | const image = h('p', h('img', { src: opts.img_base + c.about.image })) |
539 | 539 … | const attending = h('h3.attending', c.numberAttending + ' attending') |
540 … | + const title = h('h2', c.about.title) | |
541 … | + console.log('c', c) | |
540 | 542 … | return h('section', |
541 | - [image, | |
543 … | + [title, | |
544 … | + image, | |
542 | 545 … | attending, |
543 | 546 … | desc] |
544 | 547 … | ) |
545 | 548 … | } |
Built with git-ssb-web