-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.js
23 lines (20 loc) · 842 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
document.addEventListener("DOMContentLoaded", function () {
// Set profile picture
document.querySelector("#profilePicture img").src = config.profilePicture;
// Set popup picture and quote
document.querySelector(".popup-photo a").href = config.popupPicture;
document.querySelector(".popup-photo img").src = config.popupPicture;
document.querySelector(".popup-quote").textContent = config.popupQuote;
// Set user name
document.querySelector("#userName").textContent = config.userName;
// Set links
const linksContainer = document.getElementById("links");
config.links.forEach(link => {
const a = document.createElement("a");
a.className = "link";
a.href = link.href;
a.target = "_blank";
a.innerHTML = `<i class="${link.icon}"> </i>${link.label}`;
linksContainer.appendChild(a);
});
});