Conversation
JustineZwiazek
left a comment
There was a problem hiding this comment.
I loved reviewing your code Linnea. JavaScript was super concise and a pleasure to read. Since we worked on the same project all of the functions were clear to me, but since they keep recommending us to leave a lot of comments, my only feedback would be: there could be more comments describing functions 🙂 Great job with the site, really nice styling - I look forward seeing more of your work!
| const container = document.getElementById('container') | ||
| const header = document.getElementById('header') | ||
|
|
||
| const API_TOKEN = TOKEN || process.env.API_KEY; |
There was a problem hiding this comment.
I know many people struggled with the API token, so well done for setting it up! I skipped it this time, but planning to come back to it when I have time.
| .then ((data) => { | ||
| console.log(data) | ||
| header.innerHTML = ` | ||
| <a class="img-link" target="_blank" href="https://www.linkedin.com/in/linnea-frisk-59a170206/"><img src="${data.avatar_url}" width="100px" alt="User image"></a> |
There was a problem hiding this comment.
This is interesting, I need to look into target. Very cleanly written function otherwise.
| <p><span>• Last push:</span> ${new Date(repo.pushed_at).toDateString()}</p> | ||
| <p><span>• Branch:</span> ${repo.default_branch}</p> | ||
| <p><span>• Main language:</span> ${repo.language}</p> | ||
| <p id="commit-${repo.name}"><span>• Number of commits:</span> </p> |
There was a problem hiding this comment.
Really nice that you added info on the main language and the title of the page.
|
|
||
| const pulls = data.find((pull) => pull.user.login === repo.owner.login); | ||
|
|
||
| fetchCommits(pulls.commits_url, repo.name) |
There was a problem hiding this comment.
I was scratching my head how you got number of commits on all projects, but I think you were the person doing the pull each time? Unless there is some hidden trick I don't see :)
|
|
||
| } | ||
|
|
||
| .header img:hover { |
|
|
||
| /* ANIMATIONS */ | ||
|
|
||
| @keyframes colorChange { |
There was a problem hiding this comment.
Yay! I used keyframes for the first time with this project, so much fun!
|
|
||
| } | ||
|
|
||
| .repo-link:hover { |
There was a problem hiding this comment.
Going the extra mile with styling during a really tough project needs to be praised ⭐
https://project-github-tracker-linnea-frisk.netlify.app/