Skip to content

Commit

Permalink
fix: rel nofollow, textcontent, image parameter, text wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
KeziahMoselle authored and XhmikosR committed Jan 31, 2020
1 parent 3d0c222 commit 4d15fbf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
16 changes: 13 additions & 3 deletions layouts/css/page-modules/_contributor-card.scss
@@ -1,13 +1,13 @@
.contributor-card {
height: 42px;
display: flex;
min-height: 42px;
width: 300px;
padding: 1.5em 1em;
margin: 1em auto;
border: 1px solid $white;
border-radius: 3px;

> a {
float: left;
height: 40px;
width: 40px;
margin-right: 1em;
Expand All @@ -17,8 +17,12 @@
margin: 0;
}

img {
max-width: initial;
}

.spinner {
margin: 5px 0;
margin: 5px;
width: 30px;
height: 30px;
border-top-color: $white;
Expand All @@ -43,3 +47,9 @@
transform: rotate(360deg);
}
}

@media (max-width: 350px) {
.contributor-card {
width: auto;
}
}
4 changes: 2 additions & 2 deletions layouts/partials/contributor-card.hbs
@@ -1,11 +1,11 @@
<div class="contributor-card">
<a href="#">
<a href="#" rel="nofollow noopener noreferrer">
<span class="spinner"></span>
<img id="contributor-avatar" class="hidden" src="/static/images/logos/js-green.svg" alt="Avatar of a Node.js contributor" width="40" height="40">
</a>

<p>
Thank you <a href="#" id="contributor-username" rel="nofollow noopener noreferrer">username</a> for being a <a href="https://github.com/nodejs/node/graphs/contributors" rel="nofollow noopener noreferrer" title="List of all Node.js contributors">Node.js contributor</a>.
Thank you <a href="#" id="contributor-username" rel="nofollow noopener noreferrer">username</a> for being a <a href="https://github.com/nodejs/node/graphs/contributors" rel="nofollow noopener noreferrer" title="List of all Node.js contributors">Node.js contributor</a>
<a href="https://github.com/nodejs/node/graphs/contributors" rel="nofollow noopener noreferrer">
<strong id="contributor-contributions">0 contributions</strong>
</a>
Expand Down
6 changes: 3 additions & 3 deletions static/js/main.js
Expand Up @@ -150,11 +150,11 @@
loadingSpinner.remove()
contributorAvatar.classList.remove('hidden')
// Set new values
contributorAvatar.src = contributor.avatar_url
contributorAvatar.src = contributor.avatar_url + '&s=80'
contributorAvatar.parentElement.href = contributor.html_url
contributorUsername.innerText = contributor.login
contributorUsername.textContent = contributor.login
contributorUsername.href = contributor.html_url
contributorContributions.innerText = contributor.contributions + ' contributions'
contributorContributions.textContent = contributor.contributions + ' contributions'
contributorContributions.parentElement.href = 'https://github.com/nodejs/node/commits?author=' + contributor.login
})
}
Expand Down

0 comments on commit 4d15fbf

Please sign in to comment.