Bento/assets/js/cards.js

28 lines
572 B
JavaScript
Raw Normal View History

2021-07-20 20:50:46 -05:00
console.log("Connected cards");
2021-07-12 14:14:13 -05:00
2021-07-20 20:50:46 -05:00
const printCards = () => {
for (const card of CONFIG.cards) {
console.log(card.id);
let item = `
<a
href="${card.link}"
2021-07-20 21:28:00 -05:00
target="${CONFIG.openInNewTab ? "_blank" : ""}"
class="buttonLink__link card buttonLink__link-${
card.id
}"
2021-07-20 20:50:46 -05:00
>
2021-07-20 21:28:00 -05:00
<i class="buttonLink__icon" data-feather="${
card.icon
}"></i>
2021-07-20 20:50:46 -05:00
</a>
`;
const position = "beforeend";
buttonsContainer.insertAdjacentHTML(position, item);
}
};
printCards();