Skip to content

Commit

Permalink
avatar added in compare page (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
17arindam authored Oct 11, 2024
1 parent bb3f9c5 commit 694807b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pages/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ <h2>Contributor Comparison</h2>
</tr>
</thead>
<tbody>
<tr>
<td>Avatar</td>
<td id="avatar1">
<img id="avatarImg1" src="" alt="Avatar 1">
</td>
<td id="avatar2">
<img id="avatarImg2" src="" alt="Avatar 2">
</td>
</tr>
<tr>
<td>Login</td>
<td id="login1"></td>
Expand Down
3 changes: 3 additions & 0 deletions scripts/compare.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ document.addEventListener("DOMContentLoaded", function () {
.classList.remove("hidden");

// Fill the table with data
document.getElementById("avatarImg1").src = data1.avatar_url;
document.getElementById("avatarImg2").src = data2.avatar_url;

document.getElementById("login1").textContent = data1.login;
document.getElementById("login2").textContent = data2.login;

Expand Down
9 changes: 9 additions & 0 deletions styles/compare.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,12 @@ select{
color: white;
background-color: black;
}
#avatarImg1{
width: 200px;
height: 200px;
}

#avatarImg2{
width: 200px;
height: 200px;
}

0 comments on commit 694807b

Please sign in to comment.