2021-08-14 11:47:18 -05:00
|
|
|
// ┌─┐┌─┐┬─┐┌┬┐┌─┐
|
|
|
|
// │ ├─┤├┬┘ ││└─┐
|
|
|
|
// └─┘┴ ┴┴└──┴┘└─┘
|
|
|
|
|
2021-08-14 12:02:43 -05:00
|
|
|
// Print cards
|
2021-07-20 20:50:46 -05:00
|
|
|
const printCards = () => {
|
|
|
|
for (const card of CONFIG.cards) {
|
|
|
|
console.log(card.id);
|
|
|
|
|
2021-08-14 12:02:43 -05:00
|
|
|
// Card Item
|
2021-07-20 20:50:46 -05:00
|
|
|
let item = `
|
|
|
|
<a
|
|
|
|
href="${card.link}"
|
2021-08-14 11:49:20 -05:00
|
|
|
target="${CONFIG.openInNewTab ? '_blank' : ''}"
|
|
|
|
class="buttonLink__link card buttonLink__link-${card.id}"
|
2021-07-20 20:50:46 -05:00
|
|
|
>
|
2021-08-14 11:49:20 -05:00
|
|
|
<i class="buttonLink__icon" data-feather="${card.icon}"></i>
|
2021-07-20 20:50:46 -05:00
|
|
|
</a>
|
|
|
|
`;
|
|
|
|
|
2021-08-14 11:49:20 -05:00
|
|
|
const position = 'beforeend';
|
2021-07-20 20:50:46 -05:00
|
|
|
|
|
|
|
buttonsContainer.insertAdjacentHTML(position, item);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
printCards();
|