From 2035b85a061cd848762b1a3a0dac4d0979a4cfcc Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 14 Jan 2019 19:11:03 +0100 Subject: [PATCH] Added post weblink --- .../assets/js/main.js | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/assets/zip/personnal-data-export-navigator/assets/js/main.js b/assets/zip/personnal-data-export-navigator/assets/js/main.js index 55b987d9..00d4de8e 100644 --- a/assets/zip/personnal-data-export-navigator/assets/js/main.js +++ b/assets/zip/personnal-data-export-navigator/assets/js/main.js @@ -256,6 +256,59 @@ function ApplyPosts(){ + //Post with weblink + if(post.kind == "weblink"){ + + let linkCard = createElem2({ + appendTo: cardContent, + type: "div", + class: "card blue-text" + }); + + let linkCardImage = createElem2({ + appendTo: linkCard, + type: "div", + class: "card-image" + }); + + //Image + createElem2({ + appendTo: linkCardImage, + type: "img", + src: post.link_image + }); + + //Title + createElem2({ + appendTo: linkCardImage, + type: "span", + class: "card-title", + innerHTML: post.link_title + }); + + createElem2({ + appendTo: linkCard, + type: "div", + class: "card-content", + innerHTML: "

"+post.link_description+"

" + }); + + let linkCardActions = createElem2({ + appendTo: linkCard, + type: "div", + class: "card-action" + }); + + createElem2({ + appendTo: linkCardActions, + type: "a", + href: post.link_url, + innerHTML: post.link_url + }) + } + + + //Display the list of comments let postComments = createElem2({ appendTo: cardContent,