-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathscript.js
More file actions
22 lines (22 loc) · 1.06 KB
/
script.js
File metadata and controls
22 lines (22 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
try {
const teamList = document.getElementById("team-list");
if (!Array.isArray(team)) throw new Error("No team data");
team.forEach((member) => {
const match = member.github.match(/github.com\/(.+)$/);
const username = match ? match[1] : "";
const profilePic = `https://github.com/${username}.png`;
const card = document.createElement("div");
card.className = "team-card";
card.innerHTML = `
<a href="${member.github}" target="_blank" rel="noopener">
<img class="profile-pic" src="${profilePic}" alt="${member.name}">
</a>
<div class="name">${member.name}</div>
<div class="quote">“${member.quote}”</div>
`;
teamList.appendChild(card);
});
} catch {
const teamList = document.getElementById("team-list");
teamList.innerHTML = `<div style="color:#ff6b6b;background:#232837;padding:32px 18px;border-radius:12px;text-align:center;font-size:1.1em;box-shadow:0 2px 12px rgba(0,0,0,0.18);max-width:400px;margin:40px auto;">⚠️ Could not load team data. Please ensure <b>team-data.js</b> is present and loaded correctly.</div>`;
}