forked from iamsonukushwaha/tarana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f26344
commit 7af211e
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const getPersons = async () => { | ||
const person = document.getElementById('person'); | ||
let url = 'https://api.github.com/repos/flyingsonu122/tarana/contributors'; | ||
const res = await fetch(url); | ||
const data = await res.json(); | ||
// console.log(data); | ||
data.forEach(i => { | ||
let template = ` | ||
<a href = "${i.html_url}" target = "_blank" rel = "noopener noreferrer"><img src="${i.avatar_url}" alt="${i.login}" class="pic" title="${i.login}"></a> | ||
`; | ||
person.innerHTML += template; | ||
}); | ||
|
||
} | ||
|
||
window.addEventListener("DOMContentLoaded", () => getPersons()); |