-
Notifications
You must be signed in to change notification settings - Fork 0
/
team.js
34 lines (31 loc) · 1 KB
/
team.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var teamMembers = []
const teamJSON = "team.json"
function createMember(member) {
return(
`
<div class="col-lg border rounded shadow">
<div class="container text-center">
<h6 class="pt-2">${member.role}</h6>
<img src="assets/team/${member.pfp}" alt="" class="img img-fluid my-3">
<h4>${member.name}</h4>
<div class="team-links">
<a href=${member.github}><i class="bi bi-github fs-5"></i></a>
<a href="${member.linkedin}"><i class="bi bi-linkedin fs-5"></i></a>
</div>
<p class="fs-6">${member.bio}</p>
</div>
</div>
`
);
}
function getMembers(members) {
members.forEach(element => {
teamMembers.push(createMember(element));
});
}
$.getJSON(teamJSON, function(data) {
getMembers(data);
// console.log(teamMembers);
teamMembers = teamMembers.join('')
$('#team-container').html(teamMembers)
})