-
Notifications
You must be signed in to change notification settings - Fork 0
/
dynamiccards.js
63 lines (56 loc) · 1.48 KB
/
dynamiccards.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
const cards = [{
img: 'img/mrosman.png',
name: 'Jay Osman',
title: 'full-stack developer',
des: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. ',
},
{
img: 'img/jeongilnam.png',
name: 'Jeon Gilnam',
title: 'Web application developer',
des: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. ',
},
{
img: 'img/soyoungroh.png',
name: 'Soyoung Roh',
title: 'Front end developer',
des: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. ',
},
{
img: 'img/juliareda.png',
name: 'Julia Reda',
title: 'Back end developer',
des: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. ',
},
{
img: 'img/lailatretikov.png',
name: 'Laila Tretikov',
title: 'Web Designer ',
des: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. ',
},
{
img: 'img/ryanmerkley.png',
name: 'Ryan Merkley',
title: 'Game developer',
des: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. ',
},
];
function displayCards() {
let result = '';
cards.forEach((card) => {
result += `
<div class="contributors-bio-container">
<div>
<img src="${card.img}">
</div>
<div>
<h3 class="fw-bold fs-600">${card.name}</h3>
<h3 class="card-italic text-accent-400 fw-bold">${card.title}</h3>
<div class="title-indicator"></div>
<p class="card-description">${card.des}</p>
</div>
</div>`;
});
document.querySelector('.contributors-container').innerHTML = result;
}
displayCards();