Bento/assets/js/cards.js
2021-09-07 11:40:42 -05:00

27 lines
641 B
JavaScript

// ┌─┐┌─┐┬─┐┌┬┐┌─┐
// │ ├─┤├┬┘ ││└─┐
// └─┘┴ ┴┴└──┴┘└─┘
// Print cards
const printCards = () => {
for (const card of CONFIG.cards) {
// Card Item
let item = `
<a
href="${card.link}"
target="${CONFIG.openInNewTab ? '_blank' : ''}"
class="buttonLink__link card buttonLink__link-${card.id}"
>
<i class="buttonLink__icon" data-feather="${card.icon}"></i>
</a>
`;
const position = 'beforeend';
buttonsContainer.insertAdjacentHTML(position, item);
}
};
printCards();