From d15a09749d2da84b14e512778ae026fad957d7fc Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Mon, 2 Jul 2018 20:26:16 +0200 Subject: [PATCH] Render gathering images and markdown the descs --- render.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/render.js b/render.js index d9b75da..3caccc3 100644 --- a/render.js +++ b/render.js @@ -524,13 +524,9 @@ function render(opts, id, c) { return [channel, h('h2', c.title), s]; } else if (c.type === 'gathering') { - console.log('opts', opts) - console.log('c', c) - return ['id: ' + id, h('div', - ['this is a gathering boopadoop', - renderGathering(opts, id, c)] + renderGathering(opts, id, c) ) ] } @@ -538,8 +534,15 @@ function render(opts, id, c) { } function renderGathering(opts, id, c) { + console.log('opts', opts) console.log('gathering content:', c) - return h('div', c.about.description) + const desc = h('div') + desc.innerHTML = marked(c.about.description, opts.marked) + const image = h('p', h('img', { src: opts.img_base + c.about.image })) + return h('section', + [image, + desc] + ) } function renderPost(opts, id, c) {