1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export const bookmarksHtml = (bookmarks: any[], header: string = "") => {
let emailHtml = "";
header = header || `<h3>Here are your bookmarks from Raindrop:</h3>`;
let footer =
`<p>Email from val.town. You can unsubscribe by clearing your interval here: https://val.town/@me.intervals</p>`;
emailHtml = header;
emailHtml += "<br /><ol>";
bookmarks.forEach((i, index) => {
emailHtml +=
`<li><a href='${i.link}'>${i.title}</a><p>${i.excerpt}</p></li>`;
});
emailHtml += "</ol>";
emailHtml += footer;
return emailHtml;
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023