forked from HackClubRAIT/HackClubRAIT.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contributer.html
52 lines (48 loc) · 1.9 KB
/
contributer.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="styles.css" rel="stylesheet" type="text/css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<title>CONTRIBUTORS</title>
</head>
<body>
<nav>
<img id="logo" src="./images/hackclubrait.jpeg">
<ul class="navbars">
<li><a href="index.html" >HOME</a></li>
<li><a href="team.html">TEAM</a></li>
<li><a href="projects.html">PROJECTS</a></li>
<li><a href="contributer.html" class="active">CONTRIBUTORS</a></li>
<li><a href="opportunity.html" >OPPORTUNITIES</a></li>
<li><a href="contact.html">CONTACT US</a></li>
</ul>
</nav>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.21.1/axios.min.js"></script>
<div id="contributor">
</div>
</body>
<script>
const getUsers = () => {
const owner = 'HackClubRAIT',
repo = 'HackClubRAIT-Website';
axios
.get(
`https://api.github.com/repos/${owner}/${repo}/contributors`
)
.then((response) => {
var div=document.getElementById("contributor");
const users = response.data;
img_id = users.map(u => u.id);
img_user = users.map(u => u.login);
for (let i = 0; i < img_id.length; i++) {
div.innerHTML+=`<a href="https://github.com/${img_user[i]}" target="_blank_"><img src="https://avatars.githubusercontent.com/u/${img_id[i]}"/></a>`;
}
})
.catch((error) => console.error(error));
};
getUsers();
</script>
</html>