22 lines
626 B
JavaScript
22 lines
626 B
JavaScript
const tile = document.querySelectorAll(".grid-container > *")[0];
|
|
const parent = tile.parentNode;
|
|
tile.remove();
|
|
|
|
const tiles = [
|
|
{ name: "Notre wiki", href: "https://wiki.la-banquise.fr" },
|
|
{ name: "Notre git", href: "https://git.la-banquise.fr" },
|
|
{ name: "Panel jeux", href: "https://panel.la-banquise.fr" },
|
|
{ name: "Discord", href: "https://discord.gg/QQWwzX5ptY" },
|
|
|
|
]
|
|
|
|
tiles.forEach((info) => {
|
|
const newTile = tile.cloneNode(true);
|
|
newTile.querySelectorAll(".item-name").forEach((el) => {
|
|
el.innerText = info.name;
|
|
});
|
|
newTile.href = info.href;
|
|
parent.appendChild(newTile);
|
|
});
|
|
|