2021-08-14 11:47:18 -05:00
|
|
|
// ┬ ┬┌─┐┌┬┐┌─┐
|
|
|
|
// │ │└─┐ │ └─┐
|
|
|
|
// ┴─┘┴└─┘ ┴ └─┘
|
2022-02-03 11:04:50 -06:00
|
|
|
// Functions for printing both lists
|
2021-07-20 20:50:46 -05:00
|
|
|
|
2022-02-07 19:36:51 -06:00
|
|
|
const generateLists = () => {
|
|
|
|
console.log("Yeah, I'm working");
|
|
|
|
}
|
|
|
|
|
2021-07-20 20:50:46 -05:00
|
|
|
const printFirstList = () => {
|
2022-02-03 11:04:50 -06:00
|
|
|
let icon = `<i class="listIcon" icon-name="${CONFIG.firstListIcon}"></i>`;
|
2021-08-14 11:47:18 -05:00
|
|
|
const position = 'beforeend';
|
2021-07-20 20:50:46 -05:00
|
|
|
list_1.insertAdjacentHTML(position, icon);
|
|
|
|
for (const link of CONFIG.lists.firstList) {
|
|
|
|
let item = `
|
|
|
|
<a
|
2021-08-14 11:47:18 -05:00
|
|
|
target="${CONFIG.openInNewTab ? '_blank' : ''}"
|
2021-07-20 20:50:46 -05:00
|
|
|
href="${link.link}"
|
2022-02-03 11:04:50 -06:00
|
|
|
class="listItem"
|
2021-07-20 20:50:46 -05:00
|
|
|
>${link.name}</a
|
|
|
|
>
|
|
|
|
`;
|
2021-08-14 11:47:18 -05:00
|
|
|
const position = 'beforeend';
|
2021-07-20 20:50:46 -05:00
|
|
|
list_1.insertAdjacentHTML(position, item);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
const printSecondList = () => {
|
2022-02-03 11:04:50 -06:00
|
|
|
let icon = `<i class="listIcon" icon-name="${CONFIG.secondListIcon}"></i>`;
|
2021-08-14 11:47:18 -05:00
|
|
|
const position = 'beforeend';
|
2021-07-20 21:28:00 -05:00
|
|
|
list_2.insertAdjacentHTML(position, icon);
|
2021-07-20 20:50:46 -05:00
|
|
|
for (const link of CONFIG.lists.secondList) {
|
|
|
|
let item = `
|
|
|
|
<a
|
2021-08-14 11:47:18 -05:00
|
|
|
target="${CONFIG.openInNewTab ? '_blank' : ''}"
|
2021-07-20 20:50:46 -05:00
|
|
|
href="${link.link}"
|
2022-02-03 11:04:50 -06:00
|
|
|
class="listItem"
|
2021-07-20 20:50:46 -05:00
|
|
|
>${link.name}</a
|
|
|
|
>
|
|
|
|
`;
|
2021-08-14 11:47:18 -05:00
|
|
|
const position = 'beforeend';
|
2021-07-20 20:50:46 -05:00
|
|
|
list_2.insertAdjacentHTML(position, item);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-02-07 19:36:51 -06:00
|
|
|
generateLists();
|
2021-07-20 20:50:46 -05:00
|
|
|
printFirstList();
|
|
|
|
printSecondList();
|