-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
31 lines (28 loc) · 982 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
24
25
26
27
28
29
30
31
let repos_list = document.querySelector(".repos__list");
data.forEach((repo) => {
$(".repos__list").append(`
<div class="repos__card">
<img
src="./assets/images/default.png"
alt="repo Image"
class="repo__image"
onerror="this.onerror=null; this.src='./assets/images/default.png'"
/>
<div class="repo__info">
<div class="repo__tags">
${repo.stack
.map((tech) => `<div class="repo__tag">${tech}</div>`)
.join("")}
</div>
<div class="repo__name">${repo.name}</div>
<div class="repo__maintainer">${repo.maintainer}</div>
<div class="repo__description">
${repo.description.substring(0, 100)}..
</div>
<a target="_blank" class="repo__call_to_action" href="${
repo.url
}"> Contribute </a>
</div>
</div>
`);
});