git ssb

0+

Daan Patchwork / ssb-viewer



forked from cel / ssb-viewer

Commit d15a09749d2da84b14e512778ae026fad957d7fc

Render gathering images and markdown the descs

Jacob Karlsson committed on 7/2/2018, 6:26:16 PM
Parent: cecdc93fd30b7c181e4e9720a98ef8f788355906

Files changed

render.jschanged
render.jsView
@@ -523,24 +523,27 @@
523523
524524 return [channel, h('h2', c.title), s];
525525 }
526526 else if (c.type === 'gathering') {
527- console.log('opts', opts)
528- console.log('c', c)
529-
530527 return ['id: ' + id,
531528 h('div',
532- ['this is a gathering boopadoop',
533- renderGathering(opts, id, c)]
529+ renderGathering(opts, id, c)
534530 )
535531 ]
536532 }
537533 else return renderDefault(c);
538534 }
539535
540536 function renderGathering(opts, id, c) {
537+ console.log('opts', opts)
541538 console.log('gathering content:', c)
542- return h('div', c.about.description)
539+ const desc = h('div')
540+ desc.innerHTML = marked(c.about.description, opts.marked)
541+ const image = h('p', h('img', { src: opts.img_base + c.about.image }))
542+ return h('section',
543+ [image,
544+ desc]
545+ )
543546 }
544547
545548 function renderPost(opts, id, c) {
546549 opts.mentions = {};

Built with git-ssb-web