Add the following inside the main.js file, right after placing the text-content: // TODO: Add the icon function here renderLinkIcon(postTitleAnchor); And that's it. Thanks! Most upvoted and relevant comments will be first. I also added a little bit of CSS to style and center the text elements. - loloof64 Mar 26, 2016 at 17:13 Note that there is a typo in pgnImage instead of pngImage.
How to Convert an SVG to an Image in the Browser? Now lets add some simple CSS to change the fill color of the .target class. on CodePen. This will be a single row of rectangles so the overall width and height of the SVG is easy to calculate: width * number of rectangles. so it adds