|
|
|
@ -28,14 +28,16 @@ async function getRepos(username) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function createUserCard(user) {
|
|
|
|
|
const userID = user.name || user.login
|
|
|
|
|
const userBio = user.bio ? `<p>${user.bio}</p>` : ''
|
|
|
|
|
const cardHTML = `
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div>
|
|
|
|
|
<img src="${user.avatar_url}" alt="${user.name}" class="avatar">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="user-info">
|
|
|
|
|
<h2>${user.name}</h2>
|
|
|
|
|
<p>${user.bio}</p>
|
|
|
|
|
<h2>${userID}</h2>
|
|
|
|
|
${userBio}
|
|
|
|
|
<ul>
|
|
|
|
|
<li>${user.followers} <strong>Followers</strong></li>
|
|
|
|
|
<li>${user.following} <strong>Following</strong></li>
|
|
|
|
|