Commit d15a09749d2da84b14e512778ae026fad957d7fc
Render gathering images and markdown the descs
Jacob Karlsson committed on 7/2/2018, 6:26:16 PMParent: cecdc93fd30b7c181e4e9720a98ef8f788355906
Files changed
render.js | changed |
render.js | ||
---|---|---|
@@ -523,24 +523,27 @@ | ||
523 | 523 | |
524 | 524 | return [channel, h('h2', c.title), s]; |
525 | 525 | } |
526 | 526 | else if (c.type === 'gathering') { |
527 | - console.log('opts', opts) | |
528 | - console.log('c', c) | |
529 | - | |
530 | 527 | return ['id: ' + id, |
531 | 528 | h('div', |
532 | - ['this is a gathering boopadoop', | |
533 | - renderGathering(opts, id, c)] | |
529 | + renderGathering(opts, id, c) | |
534 | 530 | ) |
535 | 531 | ] |
536 | 532 | } |
537 | 533 | else return renderDefault(c); |
538 | 534 | } |
539 | 535 | |
540 | 536 | function renderGathering(opts, id, c) { |
537 | + console.log('opts', opts) | |
541 | 538 | 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 | + ) | |
543 | 546 | } |
544 | 547 | |
545 | 548 | function renderPost(opts, id, c) { |
546 | 549 | opts.mentions = {}; |
Built with git-ssb-web